/tally-api

Accounting tally app

Primary LanguagePython

Accounting tally app

Getting started

Configure the application

ENV=[production|development|test]
DEBUG=[True|False]
DB_HOST=db_host
DB_NAME='db name'
DB_USER='db user'
DB_PASSWORD='db password'

Launch the app

# By default, env = production
uvicorn app:app --host hostdomain --port xxxx
# Or with live reload & env = development
uvicorn app:app --host hostdomain --port xxxx --reload --env-file .env.dev

Or see coverage

pytest --cov=. tests

Other

Launch tests

pytest

# Or
pytest -f --color yes

Migration

#Create migration

alembic revision --autogenerate -m "Initial migration"
#Apply migration last migration

alembic upgrade head
#List migrations

alembic show ref
#Show specific migration

alembic show ref
#Restore specific migration

alembic downgrade ref