A Cookiecutter template for a Python site running on Azure Web Apps.
- Install Cookiecutter
cookiecutter gh:brettcannon/python-azure-web-app-cookiecutter(orcookiecutter https://github.com/brettcannon/python-azure-web-app-cookiecutter.gitif you prefer)- Fill in the Cookiecutter itmes (see below as to what each item represents)
- Read the
README.mdincluded with your new website skeleton on how to deploy your site
site_name: the name of the site, e.g.my-sitewould create a site with an address ofmy-site.azurewebsites.netpython_version: which version of Python to usecpu_arch: 32-bit or 64-bit Python?post_deployment_scripts_directory: the directory where the post-deployment action hooks are to be stored, e.g. the script to executepipafter each site deploymentrequirements_file_name: the path to thepiprequirements file, e.g.requirements.txtstatic_assets_directory: the name of the directory to place your static assets so IIS can serve the files directlylog_file_path: where to store logs relating to the execution of the Python interpretermain_module: The name of the Python module that contains the server codesite_type: choose whether you are creating a socket/async- or WSGI-based serversocket_port_env_var: for a socket-based server, the environment variable to store the incoming port number insocket_python_arguments: for a socket-based server, the arguments to the Python interpreter to launch your server, e.g.-m appwill be equivalent topython -m appwsgi_app_object: for a WSGI-based server, what Python callable contains the WSGI app object, e.g.app.wsgi_appmeans thewsgi_appcallable object in theappmodule