- Notifications
You must be signed in to change notification settings - Fork0
Sample code for the Flask tutorial in the VS Code documentation
License
poligraph/python-sample-vscode-flask-tutorial
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- This sample contains the completed program from the tutorial, make sure to visit the link:Using Flask in Visual Studio Code. Intermediate steps are not included.
- It also contains the Dockerfile and uwsgi.ini files necessary to build a container with a production server. The resulting image works both locally and when deployed to Azure App Service. SeeDeploy Python using Docker containers.
Thestartup.py file, for its part, is specifically for deploying to Azure App Service on Linux without containers. Because the app code is in its ownmodule in thehello_app folder (which has an__init__.py), trying to start the Gunicorn server within App Service on Linux produces an "Attempted relative import in non-package" error. Thestartup.py file, therefore, is just a shim to import the app object from thehello_app module, which then allows you to use startup:app in the Gunicorn command line (seestartup.txt).
Contributions to the sample are welcome. When submitting changes, also consider submitting matching changes to the tutorial, the source file for which istutorial-flask.md.
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, visithttps://cla.microsoft.com.
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.
- This project has adopted theMicrosoft Open Source Code of Conduct.
- For more information see theCode of Conduct FAQ or
- Contactopencode@microsoft.com with any additional questions or comments.
About
Sample code for the Flask tutorial in the VS Code documentation
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Languages
- HTML34.2%
- Python29.2%
- Dockerfile26.2%
- CSS10.4%