Skip to content
/ ida-py Public

Automate several aspects of accountancy (eg: collect incoming invoices, generate outgoing invoices)

License

Notifications You must be signed in to change notification settings

shifqu/ida-py

Repository files navigation

ida-py

IDA (I Do Accountancy). A python project to automate tedious accountancy tasks.


Test Status License Code style: black Imports: isort


System requirements

ida-py requires Python 3.10+ and Poetry 1.0+.

Tip: The recommended IDE is VSCode. A .vscode directory is provided with a file containing recommended extensions alongside default launch configurations and workspace specific settings.

Installation

Local

ida-py uses Poetry to manage the virtual environments. This makes installing the application locally a breeze.

poetry install

poetry run pip install --upgrade pip

poetry update

poetry run pre-commit install -t pre-commit -t pre-push
Tip: This repository ships with a bash script (./scripts/install.sh) which will run above commands for you.

Docker compose

ida-py consists of a few docker containers, grouped in a docker-compose.yml file.

Run the services in development mode:

docker compose up -d --build

Run the services in production mode

docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build

At some point you will have to renew the certificates. Currently this is not supported automatically.

docker compose up certbot && docker compose exec -it nginx nginx -s reload

Configuration

To enable telegram webhooks, we need a certificate and a domain name.

Domain name

Obtaining a domain name will not be covered here, since it's covered by telegram's webhook guide.

certbot and nginx are used in this project to generate certificates and serve the content over https.

Note: To counter a cold-start issue where the certificates are not found, a script (docker/nginx/wait_for_certificates.sh) is used to wait for the initial creation of the certificates.
Tip: In case things don't work with certificate generation, add --test-cert to certbot service's command to avoid letsencrypt's 5 failed attempts hourly rate limit.

Environment variables

To configure IDA, a few environment variables are mandatory, whilst others are optional. Mandatory environment variables are checked by docker-compose or at runtime. Simply adding the environment variables to a .env file will ensure that docker-compose injects the variables at runtime.


Read Latest Documentation - Browse GitHub Code Repository


About

Automate several aspects of accountancy (eg: collect incoming invoices, generate outgoing invoices)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published