Skip to content

alk3mist/e-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Check

This project uses uv to manage dependencies, etc.

Start the project directly

At first, install dependencies:

uv sync --no-project-install

You'll also need a running Postgres instance. Project was tested with the 17th version of the PostgreSQL.

Create and modify the .env file(add your Postgres settings, etc.):

cd e-check
cp example.env .env
vim .env

You'll need to create tables in the Database. Alembic package is managing the DB migrations of the project. To upgrade the DB scheme to the latest changes, activate the virtual environment and run alembic command:

source .venv/bin/activate
alembic upgrade head

or execute the command with uv without the venv activation:

uv run alembic upgrade head

To start the app, execute the Uvicorn command:

source .venv/bin/activate
uvicorn --app-dir=src e_check.main:app

or using uv:

uv run uvicorn --app-dir=src e_check.main:app

Start using the docker-compose

Ensure your .env configured correctly. Note POSTGRES_DB=db is required. Docker compose will pick it and pass variables to services.

docker compose up

Documentation page

After starting your application, you may find the API's interactive documentation on http://localhost:8000/docs or on http://localhost:8080/docs if you're using docker-compose.

Alternatively, you could use the Redoc read only documentation on http://localhost:8000/redoc or on http://localhost:8080/redoc for docker compose.

Tests

To run tests, either active the virtual environment or use uv run from the project root directory:

source .venv/bin/activate
pytest
uv run pytest

Note

Tests use the testcontainers package(for Postgres), that uses Docker under the hood, so you'll need Docker to be installed to run tests.

About

🧾 Test project for creating and viewing e-receipts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors