Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amoghmadan/python-fastapi-rest-starter
Kick starter to your REST project.
https://github.com/amoghmadan/python-fastapi-rest-starter
alembic fastapi sqlalchemy
Last synced: about 1 month ago
JSON representation
Kick starter to your REST project.
- Host: GitHub
- URL: https://github.com/amoghmadan/python-fastapi-rest-starter
- Owner: amoghmadan
- Created: 2024-09-08T07:39:23.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-05T13:49:16.000Z (4 months ago)
- Last Synced: 2024-11-08T13:05:57.829Z (3 months ago)
- Topics: alembic, fastapi, sqlalchemy
- Language: Python
- Homepage: https://github.com/amoghmadan/Python-FastAPI-REST-Starter
- Size: 38.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python FastAPI REST Starter
Kick-starter to your REST application.
## How to set up environment variables?
- Fill the .env file with the following values, they might need adjustment.
```dotenv
DEBUG= # Dev: True
SECRET_KEY= # Dev: a1b2c3d4e5f6g7h8i9j10k11l12m13n14o15p16q
DATABASE_URI= # Dev: sqlite:///db.sqlite3
```## How to set up project for development?
- Create a virtual environment: -
```bash
python -m venv venv
```
- Activate: -
- Windows: `venv\Scripts\activate`
- Unix-like: `. venv\bin\activate`
- Install dependencies: -
```bash
pip install . -e '.[automation,sqlite,test]'
```
- Run: -
```bash
uvicorn app.asgi:application --reload
```## How to set up project for deployment?
- Create a virtual environment: -
```bash
python -m venv venv
```
- Activate: -
- Windows: `venv\Scripts\activate`
- Unix-like: `. venv\bin\activate`
- Install dependencies: -
```bash
pip install -e '.[sqlite,deployment]'
```
- Run: -
```bash
gunicorn app:asgi:application -b 0.0.0.0:8000 -w 4 -k uvicorn.workers.UvicornWorker --log-level INFO
```