Day 15: Python Libraries

Day 15: Python Libraries

ยท

1 min read

#Day15 of #90DaysofDevops challenge

Click here to view Day 15 Task

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 Pythonfor DevOps.

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

Tasks

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

    JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write and easy for machines to parse and generate. It is a text-based format that is often used to transmit data between web servers and web applications and is widely used in modern web development.

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

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

    Thank you for reading! ๐Ÿ

    Nidhi

ย