This is a API project build with FastAPI et PostfgreSQL, you can :
- Register, add user (JWT Authentication)
- Create, Read, Updated and Delete posts
- Likes system
- Main page can filter the post (likeds, owners)
- Use Alembic for updated the database
git clone git@github.com:Dr00pyd00/Level-2-Project-Fastapi.git
cd Level-2-Project-Fastapi
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
# install dependences:
pip install -r requirements.txt
Create .env File in the root and :
DATABASE_URL=postgresql://user:password@localhost:5432/blog_db
SECRET_KEY=your_secret_key
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
uvicorn app.main:app --reload
# or use fastapi dev tool:
fastapi dev
- POST Create user
- POST Login : give access token
- POST Create a post
- GET get all posts ( possible filter 'liked' / 'owner' )
- Get get one post by ID
- PUT update a post by ID
- DELETE delete a post by ID
- POST toogle like button: like or unlike
- FastAPI
- SQLAlchemy + Alembic
- PostgreSQL
- JWT Auth