A simple user API to learn how to use Sanic and Tortoise-ORM
To run this project, you will need to add the following variables to your environment or .env
PROJECT_KEY
-> Secret to make JWTs and other security related features, you can use:
openssl rand -hex 32
DATABASE_URI
-> URI with schema to connect to db, Ex: sqlite://db.sqlite3
- Register
- Login
- Logout
- Profile CRUD
Install sanic-tortoise-user-api with poetry
cd sanic-tortoise-user-api
poetry install
Or
cd sanic-tortoise-user-api
docker compose up -d
- Add unit tests
Back-end: Python, Sanic, TortoiseORM
To build project:
docker build -t sanic-tortoise-user-api:latest .
- Docker exposes port 8000
Clone the project
git clone https://github.com/guscardvs/sanic-tortoise-user-api
Enter project directory
cd sanic-tortoise-user-api
Install packages
poetry install
Start the Server (Port 5000)
make run-dev