/memento

Primary LanguagePythonOtherNOASSERTION

memento

A flashcard project

Prerequisites

  • Python 3.9+
  • Poetry 1.2+
  • Postgresql 10+

Development

.env example

DEBUG=True
SERVER_HOST=http://localhost:8000
SECRET_KEY=qwtqwubYA0pN1GMmKsFKHMw_WCbboJvdTAgM9Fq-UyM
SMTP_PORT=1025
SMTP_HOST=localhost
SMTP_TLS=False
BACKEND_CORS_ORIGINS=["http://localhost"]
DATABASE_URI=postgres://postgres:password@localhost/memento
DEFAULT_FROM_EMAIL=memento@gmail.com
REDIS_URL=redis://localhost
FIRST_SUPERUSER_EMAIL=admin@mail.com
FIRST_SUPERUSER_PASSWORD=admin

Database setup

Create your first migration

aerich init-db

Adding new migrations.

aerich migrate --name <migration_name>

Upgrading the database when new migrations are created.

aerich upgrade

Run the fastapi app

python manage.py work

Cli

There is a manage.py file at the root of the project, it contains a basic cli to hopefully help you manage your project more easily. To get all available commands type this:

python manage.py --help

Credits

This package was created with Cookiecutter and the cookiecutter-fastapi project template.