Getting Started with Application Gateway in Python

Última actualización: 24/04/2017
Editar en GitHub

On this page

Run this sample

  1. If you don't already have it, install Python.

  2. Set up a virtual environment to run this example. You can initialize a virtual environment this way:

    pip install virtualenv
    virtualenv mytestenv
    cd mytestenv
    source bin/activate
    
  3. Clone the repository.

    git clone https://github.com/Azure-Samples/network-python-manager-application-gateway.git
    
  4. Install the dependencies using pip.

    cd network-python-manager-application-gateway
    pip install -r requirements.txt
    
  5. Create an Azure service principal, using Azure CLI, PowerShell or Azure Portal.

  6. Export these environment variables into your current shell.

    export AZURE_TENANT_ID={your tenant id}
    export AZURE_CLIENT_ID={your client id}
    export AZURE_CLIENT_SECRET={your client secret}
    export AZURE_SUBSCRIPTION_ID={your subscription id}
    
  7. Run the sample.

    python example.py
    

More information

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.