Compartir a través de


Language support of Batch Client Library - Python

When Azure Batch was initially released last summer, there was only 1 client language we supported, and that was C#. But we always understand that our customers live in a diversified world, and the requirements of developers are different. This is especially true since we introduced Linux support in Azure Batch.

As a part of the Linux support in Batch, we have added support for a series of languages to the Batch SDK. At the time of this blog post, besides C#/.Net, we also support Java, Python, and Node.js.

We have updated our documentation with a Python version of the tutorial. You can follow the guide to install the azure-batch and azure-storage packages with pip, and learn how the tutorial sample interacts with the Azure Batch service to run a simple parallel workload. We also have additional Python sample code on GitHub for you to try.

The Batch Python SDK provides all Batch functionality provided by the REST API with a few extra helpers, like dealing with the continuous token for paged result. Batch Python SDK requires either Python 2.7 or 3 (3.3 – 3.5). We have tested the library on both Windows and Linux platform. Note that your client environment does not need to be the same as your Batch nodes. You can create an Ubuntu-based pool from a Windows client, and vice-versa.

Finally, I highly recommend you view the README document on Batch sample projects. If not the introduction to the samples, at least the Azure Batch on Linux Best Practices section.