Use Python to manage Azure: basic configuration, pythonazure

Source: Internet
Author: User
Tags azure sdk

Use Python to manage Azure: basic configuration, pythonazure

Azure provides rich Python sdks for Azure development and management, including using Azure's open-source framework to create web applications on Azure and managing Azure virtual machines and storage, this series will briefly introduce how to manage Azure in ASM and ARM modes.

1. first, we need to configure the basic development environment. Thanks to Python's multi-platform support, Azure also provides SDK versions for Linux, Windows, and Mac, allows python developers on different platforms to quickly create Azure-based applications.

2. before starting the test, you need an Azure account. You can apply for a test on the Azure official website or use web-direct to pay for the test. If your enterprise already has an Azure account, ask your enterprise administrator for a test account. currently, the main Python versions for installing Python are 2. X Series and 3. X Series, they have some differences in function functions, writing, and usage, and the most important is 2. the latest version of x is 2.7.x, which will gradually exit the stage. However, it is widely used, so it has good compatibility. In particular, you have some old python applications, and python 3.x is the future direction, it is also widely used, so there are no special requirements. We recommend that you use Python 3.X.

3. Download and install python:

  • You can download www.python.org from the Python official website.
  • You can also download from some of his distribution providers, such as: http://www.activestate.com/, https://www.enthought.com/,https://www.continuum.io/
  • I personally use the last one, which contains a lot of machine learning libraries, such as Sklearn and NumPy, to save your dependency on installation.
4. After installing Python, you can install the Azure SDK on the Windows, Linux, and Mac platforms using pip. Before installing the SDK, remember to upgrade your pip version:
python -m pip install --upgrade pip
5. Install the Azure SDK:

Install the Azure SDK on Windows:

pip install azure

Install the Azure SDK on Linux:

sudo pip install azure

 

6. In addition to installing the standard Azure library, If You Want To develop storage and servicebus using python and develop some legacy programs, continue to install the following module:

# Install the Azure Repository

pip install azure-storage

  # Install the ARM Management Library
pip install azure-mgmt
  # Install the old ASM Management Library
pip install azure-servicemanagement-legacy
# Install servicebus Library
pip install azure-servicebus
If you see that all the above-mentioned Magic Caves have been installed, you can test the upgrade and installation to see if the latest library has been installed:
pip install azure-storage –upgrade
7. Alternatively, you can use the Web Platform Installer to install the default python and SDK for you:

Microsoft Azure SDK for Python 2.7

Microsoft Azure SDK for Python 3.4

If you are still interested in the final test, you can check it here. You are also welcome to contact me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.