編集

次の方法で共有


Python 用 Azure Web Apps ライブラリAzure Web Apps libraries for Python

概要Overview

Azure App Service を使用して、Web サイト、Web アプリケーション、サービス、REST API のデプロイとスケーリングを行います。Deploy and scale websites, web applications, services, and REST APIs with Azure App Service.

Azure App Service の概要については、「Azure に Python Web アプリを作成する」を参照してください。To get started with Azure App Service, see Create a Python web app in Azure.

管理 APIManagement API

Azure App Service でホストされている要素のデプロイ、管理、スケーリングを行うには、Management API を使用します。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

Web アプリを GitHub リポジトリから Azure Web アプリにデプロイします。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

Web アプリケーションのサンプルの完全な一覧を表示します。View the complete list of web application samples.