Bibliotecas de Azure Web Apps para PythonAzure Web Apps libraries for Python

Información generalOverview

Implemente y escale sitios web, aplicaciones web, servicios y API de REST con Azure App Service.Deploy and scale websites, web applications, services, and REST APIs with Azure App Service.

Para empezar a trabajar con Azure App Service, consulte Creación de una aplicación web de Python en Azure.To get started with Azure App Service, see Create a Python web app in Azure.

API de administraciónManagement API

Implemente, administre y escale elementos hospedados en Azure App Service con la API de administración.Deploy, manage, and scale elements hosted in the Azure App Service with the management API.

Instale la biblioteca mediante pip.Install the library via pip.

pip install azure-mgmt-web

EjemploExample

Implemente una aplicación web desde un repositorio de GitHub en Azure Web App.Deploy a webapp from a GitHub repository into Azure Web App.

siteConfiguration = SiteConfig(
    python_version='3.4'
)

# create a web app
web_client.web_apps.create_or_update(
    RESOURCE_GROUP_NAME,
    WEB_APP_NAME,
    Site(
        location='eastus',
        server_farm_id=SERVICE_PLAN_ID,
        site_config=siteConfiguration
    )
)

# continuous deployment with GitHub
source_control_async_operation = web_client.web_apps.create_or_update_source_control(
    RESOURCE_GROUP_NAME,
    WEB_APP_NAME,
    SiteSourceControl(
        location='GitHub',
        repo_url='https://github.com/lisawong19/python-docs-hello-world',
        branch='master'
    )
)

EjemplosSamples

Vea la lista completa de ejemplos de aplicaciones web.View the complete list of web application samples.