FastAPI is a modern Python framework for building fast, typed APIs. This workspace pairs it with Pydantic and gives you a running app on port 8000, complete with the auto-generated interactive docs at /docs the moment it boots.
FastAPI and Pydantic are installed and main.py has working routes. Start the dev server and the API runs on port 8000.
The full cloud editor with an integrated terminal, extensions and a debug config in the .vscode folder, so F5 starts the app with auto-reload.
FastAPI generates Swagger UI at /docs and ReDoc at /redoc from your code, so you can try endpoints in the browser without a separate client.
Running with fastapi dev watches your files, so saving main.py reloads the server and your route changes apply right away.
FastAPI is a Python framework for building APIs using standard type hints. It validates and serializes request and response data through Pydantic, and it generates interactive OpenAPI docs from your code automatically. The async support and editor autocompletion are a big part of why it's become a common pick for new Python services.
This workspace ships a small FastAPI app with Pydantic models, so the typed-validation workflow is set up from the start. There are a couple of example routes and a request body model, which is enough to show how path parameters, query parameters and POST bodies come together.
main.py holds a FastAPI app with a root route, a path-parameter route, and a POST route that takes a Pydantic Item model and returns a computed total. requirements.txt pulls in fastapi[standard] and pydantic, so the dev server and the standard extras are installed on boot. The .vscode folder includes a debug config for F5.
Because the request models are Pydantic, validation and the generated docs come for free. Add more models and routes and the Swagger UI updates to match without any extra wiring.
Open the terminal and run fastapi dev main.py --host 0.0.0.0 --port 8000. The API starts on port 8000 with auto-reload, and Studio opens it in the built-in browser preview. Visit /docs for the Swagger UI or /redoc for ReDoc to explore and call your endpoints interactively.
REST and JSON APIs, backends for a single-page app or mobile client, microservices, and ML model endpoints that return predictions. The typed request and response models keep the contract clear, and the auto docs make the API easy for others to consume.
Open the terminal and run fastapi dev main.py --host 0.0.0.0 --port 8000, or press F5 to start with auto-reload. The API serves on port 8000 and Studio opens it in the built-in preview.
FastAPI generates them for you. Open /docs for the Swagger UI or /redoc for ReDoc on your running app, for example http://localhost:8000/docs. From Swagger UI you can call any endpoint directly in the browser.
Pydantic defines and validates your request and response data through Python type hints. The example Item model in main.py shows how a POST body is validated and serialized, and it also drives the generated docs.
Yes. fastapi dev runs with auto-reload, so saving main.py restarts the server and your route changes take effect on the next request.
Add route functions in main.py with decorators like @app.get and @app.post, and define Pydantic models for request bodies. Install any extra packages with pip and add them to requirements.txt.
FastAPI needs a paid plan. The free templates are marked as such in Studio, and you can upgrade from the pricing page any time to launch this workspace.