Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alun-price/fastapittut
https://github.com/alun-price/fastapittut
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alun-price/fastapittut
- Owner: Alun-Price
- Created: 2023-11-18T00:30:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-18T00:55:34.000Z (about 1 year ago)
- Last Synced: 2024-11-08T16:14:58.990Z (about 2 months ago)
- Language: Python
- Size: 254 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Advantages of FastAPI
- it's fast (the clue is in the name)
- very performant - uses types that allow you to skip lots of validation
- automatically produces documentation
- the typing allows for hinting when using VSCode### Setup Steps
#### Clone the repo
#### Create a Virtual Environment
`python -m venv venv`
`source venv/bin/activate`
#### Install fastapi and uvicorn
`pip install fastapi`
`pip install uvicorn`
#### Run the App using Uvicorn
`uvicorn working:app --reload`
Go to `http://127.0.0.1:8000/docs' to see the documentation
![FastAPIDocs](image.png)
### Trying out the APIs
Click on the down arrow on the API you want to try
Click the "Try it out" button
Add the relevent details and click the "Execute" button to see the APIs in action
![Alt text](image-1.png)
### Starting out
You'll need to use the `/create-item/{item_id}` endpoint to create an item to interact with before you can use the other endpoints