Skip to content

Minimal clone of twitter REST API with grpc analytics service

License

Notifications You must be signed in to change notification settings

BinDruid/twitter-fast-api

Repository files navigation

Twitter Minimal API

Prerequisites

  • Python 3.11
  • Postgresql 15

Development

.env example

DEBUG=True
SECRET_KEY=super_secret_key
DB_URL=postgres://postgres:password@localhost/database_name
PAGINATION_PER_PAGE=20
JWT_SECRET=secret_key
JWT_ALG=HS256
JWT_EXP=86400

Database setup

Run database server

docker compose -f ./docker-compose-dev.yml up

Create your first migration

alembic revision --autogenerate

Upgrading the database when new migrations are created

alembic upgrade head

Run fastapi app

make dev

Check API documentation at localhost:8000/docs or localhost:8000/redoc

Run database migrations

make migrate

Run tests

make test

About

Minimal clone of twitter REST API with grpc analytics service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages