Python SDKs (and why everyone uses them) – Provisioning Resources

Python SDKs (and why everyone uses them)

Let’s take it from the top. SDKs, or software development kits, are official programming libraries and CLIs released by a platform that allows developers to develop tools and applications that leverage that platform. These SDKs are usually written in very popular languages so as to cover the largest number of developers possible.

The three major clouds (where the majority of DevOps work is done) have the following programming languages in common among them for SDKs: Java, .NET, C++, Go, JavaScript/TypeScript/Node.js, and Python. If you work on one of these – and the chances that you do are greater than the chances that you don’t – you need to choose a programming language.

So, the question then becomes, why Python? Also, why are we asking this question four chapters into this book? Well, I’ll tell you. Python is the exact balance between loose and structured that is necessary to pull off a lot of DevOps principles.

Strictly typed languages such as Java, .NET, and C++ can be good for development, but they will produce awful results for the flexibility that is required of the modern DevOps workload. That being said, most clouds are built on these languages. But operating on them is a different game entirely. Think of these languages as the bones that provide sturdiness and Python as the joints that provide flexibility – they should be everywhere that requires flexibility.

Then, on the other end of the spectrum, you have that JavaScript trio. The reason they are sometimes unsuited for this – even though there is a massive amount of support for them from the major clouds – is the limitations and syntactic quirks that are natural to these languages. They aren’t meant to natively work this way and in addition to that, they are single-threaded and difficult to operate concurrently.

The primary competitor and, at times, cooperator to Python in this department is Go. And let me tell you, Go is good. A majority of cloud-based tools such as Docker and Kubernetes are built in Go, and ones that aren’t are usually built in Python. But Go is really the only other language that can go toe to toe with Python for how useful it is in DevOps. And I’m telling you this because much of what I’m going to work through in this chapter will involve frameworks written in Go, such as Terraform and Docker.

With all of this information out of the way, let’s finally put the focus back on Python. Python is easygoing. It has variable assignment without strict data types, which is incredibly useful for loosely coupled services, a very common architectural choice. It has a big community and is almost always the first SDK offered by modern infrastructure providers. As mentioned previously in this section, Python can essentially enter into a symbiotic relationship with any framework written in any language. If there is a popular framework or tool, its Pythonic version will likely be well-maintained and properly updated.

That was a quick look at the importance of and popularity of Python SDKs, now, we are now going to see an example of how Python SDKs can be used to provision resources.

Leave a Reply

Your email address will not be published. Required fields are marked *