Skip to content
Sample code for the Flask tutorial in the VS Code documentation
Branch: master
Clone or download
Pull request Compare This branch is 16 commits ahead of Microsoft:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Python/Flask tutorial sample for Visual Studio Code


The file, for its part, is specifically for deploying to Azure App Service on Linux without containers. Because the app code is in its own module in the hello_app folder (which has an, trying to start the Gunicorn server within App Service on Linux produces an "Attempted relative import in non-package" error. The file, therefore, is just a shim to import the app object from the hello_app module, which then allows you to use startup:app in the Gunicorn command line (see startup.txt).


Contributions to the sample are welcome. When submitting changes, also consider submitting matching changes to the tutorial, the source file for which is

Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit

When you submit a pull request, a CLA-bot automatically determines whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Additional details

You can’t perform that action at this time.