Git Product home page Git Product logo

python-fastapi-tutorial's Introduction

Python/FastAPI Tutorial for Visual Studio Code

This sample contains the completed program from the tutorial: FastAPI in Visual Studio Code. Immediate steps are not included.

Run the app using GitHub Codespaces

GitHub Codespaces provides cloud-powered development environments that work how and where you want it to. To learn how to set up a GitHub Codespace for this repository, check the documentation.

Once you open this repository in GitHub Codespaces, you can press F5 to start the debugger and run the application.

Once it's ready, you will see a notification with a button Open in the Browser. Clicking the button will open your application on the browser. You can then add /docs to the end of the URL to access the Swagger UI and interact with the application!

Run the app locally in VS Code

There are diffent ways you can run this app locally in VS Code depending on your operating system. To get started, first clone this project on your machine and then open it in VS Code (File > Open Folder...).

Windows

To run this app locally in VS Code on Windows, you can use either WSL (Windows Subsystem for Linux) or Docker.

Docker Containers

  1. Make sure you have Docker installed
  2. Install the Dev Containers extension
  3. Open the Command Palette in VS Code (View > Command Palette...) and run the "Dev Container: Reopen in Container" command.
  4. Press F5 to debug your application!

WSL

  1. Make sure you have WSL installed
  2. Install the WSL extension for VS Code
  3. Open the Command Palette in VS Code (View > Command Palette...) and run the "WSL: Reopen Folder in WSL" command
  4. Follow the remaining steps for macOS/Linux below.

macOS / Linux

  1. Install the Python extension for VS Code
  2. Run the "Python: Create Environment" command in the Command Palette
  3. Select Venv, the latest available version of Python and then the requirements.txt file to install the dependencies.
  4. Press F5 to run your application!

Contributing

Contributions to the sample are welcome! When submitting changes, also consider submitting matching changes to the tutorial, the source file for which is tutorial-fastapi.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, visit https://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.

Additional details

python-fastapi-tutorial's People

Contributors

luabud avatar microsoftopensource avatar minsa110 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.