Day15 ----> 90DaysOfDevOps Challenge @TWS

Day15 ----> 90DaysOfDevOps Challenge @TWS

Day 15 Task: Python Libraries for DevOps

Reading JSON and YAML in Python

  • As a DevOps Engineer, you should be able to parse files, be it txt, json, yaml, etc.

  • You should know what all libraries one should use in Python for DevOps.

  • Python has numerous libraries like os, sys, json, yaml etc that a DevOps Engineer uses in day-to-day tasks.

Tasks

  • Create a Dictionary in Python and write it to a json File.

Syntax: json.dumps(dictionary, indent)

image

  • Read a json file services.json kept in this folder and print the service names of every cloud service provider.

image

image

  • Read YAML file using python, file services.yaml and read the contents to convert yaml to json

image

Day15 task is completed!

90DaysOfDevOps Tasks👇

github.com/Chaitannyaa/90DaysOfDevOps.git

(6) Activity | Chaitannyaa Gaikwad | LinkedIn