Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sample code for the FastAPI tutorial in the VS Code documentation

License

NotificationsYou must be signed in to change notification settings

microsoft/python-sample-vscode-fastapi-tutorial

Repository files navigation

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 thedocumentation.

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

Once it's ready, you will see a notification with a buttonOpen 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 eitherWSL (Windows Subsystem for Linux) orDocker.

Docker Containers

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

WSL

  1. Make sure you haveWSL installed
  2. Install theWSL 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 formacOS/Linux below.

macOS / Linux

  1. Install thePython extension for VS Code
  2. Run the "Python: Create Environment" command in the Command Palette
  3. SelectVenv, the latest available version of Python and then therequirements.txt file to install the dependencies.
  4. PressF5 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 istutorial-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, 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.

Additional details

About

Sample code for the FastAPI tutorial in the VS Code documentation

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors5

Languages


[8]ページ先頭

©2009-2025 Movatter.jp