https://github.com/mmncit/fast-posts
Backend for Post Management System (Minimal using FastAPI, SQLAlchemy, PostgresDB, Alembic)
https://github.com/mmncit/fast-posts
alembic backend-api fastapi postgres python sqlalchemy-orm
Last synced: 3 months ago
JSON representation
Backend for Post Management System (Minimal using FastAPI, SQLAlchemy, PostgresDB, Alembic)
- Host: GitHub
- URL: https://github.com/mmncit/fast-posts
- Owner: mmncit
- Created: 2023-02-06T07:01:34.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-16T15:02:23.000Z (almost 2 years ago)
- Last Synced: 2025-01-19T12:49:06.680Z (5 months ago)
- Topics: alembic, backend-api, fastapi, postgres, python, sqlalchemy-orm
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fast-posts
Minimal Post Management System using FastAPI, SQLAlchemy, PostgresDB
## Local Setup:
1.0. Create a virtual environment (optional)
```
python3 -m venv venv
```- Update python interpreter to venv
- Activate venv for command line
```
source venv/bin/activate
```1.1. Go inside api directory
```
cd api
```2. Install python packages
```
make install
```3. Create .env file containing credentials:
```
# for database connection
export DATABASE=
export DB_USER=
export DB_HOST=
export DB_PASSWORD=
export DB_URL=# for jwt
export SECRET_KEY=
export ALGORITHM=
export ACCESS_TOKEN_EXPIRE_MINUTES=```
Apply environment variables
```
source .env
```
4. Finally, run command using `make`
If `make` is not installed. Then
```
brew install make
```Run the server implemented with raw SQL with:
```
make run-sql```
Run the server implemented with Object Relational Mapper (ORM) SQLAlchemy with:
```
make run-orm
```