Python용 Azure Web Apps 라이브러리Azure Web Apps libraries for Python

개요Overview

Azure App Service를 사용하여 웹 사이트, 웹 애플리케이션, 서비스 및 REST API를 배포하고 크기 조정합니다.Deploy and scale websites, web applications, services, and REST APIs with Azure App Service.

Azure App Service를 시작하려면 Azure에서 Python 웹앱 만들기를 참조하세요.To get started with Azure App Service, see Create a Python web app in Azure.

관리 APIManagement API

관리 API를 사용하여 Azure App Service에서 호스팅되는 요소를 배포, 관리 및 크기 조정합니다.Deploy, manage, and scale elements hosted in the Azure App Service with the management API.

pip를 통해 라이브러리를 설치합니다.Install the library via pip.

pip install azure-mgmt-web

Example

GitHub 리포지토리에서 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'
    )
)

샘플Samples

웹 애플리케이션 샘플의 전체 목록을 봅니다.View the complete list of web application samples.