This project provides a set of Python packages that make it easy to access the Microsoft Azure storage and queue services. For documentation on how to host Python applications on Microsoft Azure, please see the Microsoft Azure Python Developer Center.
The SDK supports Python 2.7, 3.3, 3.4.
- Tables
- create and delete tables
- create, query, insert, update, merge, and delete entities
- Blobs
- create, list, and delete containers, work with container metadata and permissions, list blobs in container
- create block and page blobs (from a stream, a file, or a string), work with blob blocks and pages, delete blobs
- work with blob properties, metadata, leases, snapshot a blob
- Storage Queues
- create, list, and delete queues, and work with queue metadata
- create, get, peek, update, delete messages
- Service Bus
- Queues: create, list and delete queues; create, list, and delete subscriptions; send, receive, unlock and delete messages
- Topics: create, list, and delete topics; create, list, and delete rules
- Service Management
- storage accounts: create, update, delete, list, regenerate keys
- affinity groups: create, update, delete, list, get properties
- locations: list
- hosted services: create, update, delete, list, get properties
- deployment: create, get, delete, swap, change configuration, update status, upgrade, rollback
- role instance: reboot, reimage
- discover addresses and ports for the endpoints of other role instances in your service
- get configuration settings and access local resources
- get role instance information for current role and other role instances
- query and set the status of the current role
To get the source code of the SDK via git just type:
git clone https://github.com/Azure/azure-sdk-for-python.git
cd azure-sdk-for-python
Alternatively, to get the source code via the Python Package Index (PyPI), type
%SystemDrive%\Python27\Scripts\pip.exe install azure
You can use these packages against the cloud Microsoft Azure Services, or against the local Storage Emulator (with the exception of Service Bus features).
- To use the cloud services, you need to first create an account with Microsoft Azure. To use the storage services, you need to set the AZURE_STORAGE_ACCOUNT and the AZURE_STORAGE_ACCESS_KEY environment variables to the storage account name and primary access key you obtain from the Azure Portal. To use Service Bus, you need to set the AZURE_SERVICEBUS_NAMESPACE and the AZURE_SERVICEBUS_ACCESS_KEY environment variables to the service bus namespace and the default key you obtain from the Azure Portal.
- To use the Storage Emulator, make sure the latest version of the Microsoft Azure SDK is installed on the machine, and set the EMULATED environment variable to any value ("true", "1", etc.)
For detailed usage information please view our documentation at azure-sdk-for-python.ReadTheDocs.org
** For more examples please see the Microsoft Azure Python Developer Center **
Be sure to check out the Microsoft Azure Developer Forums on Stack Overflow if you have trouble with the provided code.
If you would like to become an active contributor to this project please follow the instructions provided in Microsoft Azure Projects Contribution Guidelines.
If you encounter any bugs with the library please file an issue in the Issues section of the project.