https://github.com/imtahiriqbal/fastapi-sample
https://github.com/imtahiriqbal/fastapi-sample
api fastapi fastapi-crud python virtualenv
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/imtahiriqbal/fastapi-sample
- Owner: imtahiriqbal
- Created: 2025-03-19T11:21:10.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-19T11:36:35.000Z (about 1 year ago)
- Last Synced: 2025-03-19T12:31:26.495Z (about 1 year ago)
- Topics: api, fastapi, fastapi-crud, python, virtualenv
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Create virutal environment
- ```python3 -m venv ENV_NAME```
- ```source ENV_NAME/bin/activate```
### Install FastAPI library
- ```pip install fastapi[standard]```
- Run: ```fastapi run```
- Run (auto-reload): ```fastapi run --reload```
- Run from specific file: ```fastapi run main.py```
- Run with host & port: ```fastapi run --host localhost --port 8000```
OR
- Run: ```uvicorn main:app --reload```
### Application serving
- Browser JSON format: ```http://localhost:8000```
- Swagger UI: ```http://localhost:8000/docs```
- Redocly UI: ```http://localhost:8000/redoc```
### For tests
- ```pip install pytest```
- Run:
`pytest`