Skip to main content

Command Palette

Search for a command to run...

Python for devops

Updated
•2 min read•View as Markdown
Python for devops
History of PYTHON:-
Python was developed in the year 1990, and since then it is used for many applications.
  • The shell script is generally used for OS automation and Python was developed for OS automation but even after the obsolete Amoeba OS Python continues to be a useful tool for the automation of daily activities of IT professionals such as DevOps engineers.

  • Python is popularly known for its easy-to-learn and easy-to-write code, people familiar with c and c++ the universal language for OS

  • automation know it as having few crashes at the automation layer whereas Python is a powerful tool for automation.

Python - a high-level language.

  • Python is among the programming language that falls under the category of high-level, interpreted language a high-level language is a kind of language that can't be understood directly by a machine.

  • Machines are designed to read machine code, first it is converted to bytecode and then machine code before then the program can be executed.

  • For example java or c++ it needs to be compiled into an executable then it gets executed, whereas in pyton compilation step will be skipped and directly run the code.

Python - Easy to read

  • Python is known for its easy-to-read syntax. python reads almost like plain English, making it easy to write.

  • For beginners, it's one of the best languages to learn and start a career.

Python summary

  • Interpreted

  • Platform independent

  • free and open source

  • high-level language

  • Simple to learn

  • robust

  • rich library support

Why learn python

  • Python is a widely used multi-purpose, high-level programming language, which allows programming in object-oriented and procedural paradigms.

  • In comparison to other programming languages like java or .net, python are smaller programs.

  • programmers have to type relatively less and the indentation requirement of the language, make them readable all the time.

  • As DevOps engineers, we use python for DevOps in terms of automation, continuous integration/deployment/delivery CI/CD and custom auto-scaling solutions.

  • For a DevOps engineer, python plays a key role, some companies prefer to have a code session where devops engineer code testing skills are tested.

Python - Version

  • It has had several major updates in the past python 2.7 was widely used for a very long time even after the release of the newer version.

  • However, python 2.7 has been deprecated as of Jan 2020, replaced with Python 3.xx version

It is recommended to keep up with the latest tech, use Python 3. xx version

More from this blog

Welcome to Devops Learning !!!!

24 posts