Making a simple API with FastAPI and uvicorn. The main purpose is to try out FastAPI + documentation generation (with Redoc).
Another purpose of this project is to learn basic usage of FastAPI, by following the core CRUD pattern:
-
Create with
POST -
Read with
GET -
Update with
PUT -
Delete with
DELETE
This API will be a simple foraging log, including information about mushrooms and berries you can forage in Sweden.
Before you start, make sure you have the proper setup (especially if using VS Code with FastAPI), which includes:
-
You have installed
fastapianduvicorn -
You have a
main.pyfile setup :) -
You have a
requirements.txtfile in your project directory, withfastapilisted -
You have followed the instructions in VS Code's Python FastAPI guide to:
- Create a virtual environment
- Select the correct Python interpreter
- Install the required dependencies
Tip: To start your API, run the following command:
uvicorn main:app --reloadSee Make an API for detailed instructions.
Godspeed.