Skip to main content

Command-line client for pretix that allows to synchronize bank transaction statements to pretix

Project description

This is a command-line tool for pretix that allows you to automatically query your bank account and sync transaction data to a pretix server. This uses an API provided by pretix version 1.5 or newer.

Current limitations:

  • Currently limited to banks implementing the FinTS protocol (formerly HBCI), which is mostly availabile with Germany banks.

  • Only supports PIN/TAN authentication, no chip cards.

  • Currently only supports uploading bank transactions on a per-organizer level, not on a per-event level.

Currently, this tool stores your banking PIN in plain text on disk or ask you any time. We advise you to use a read-only banking login or strong two-factor-auth for transactions. We will add support for system keyrings at a later point in time.

Installation and usage

First, make sure you have a recent Python installation on your system. If python -V gives you a version 2.x, try using python3 instead or install a newer Python. We recommend Python 3.6+, but 3.4+ should work as well.

Then, we recommend creating a virtual environment to isolate the python dependencies of this package from other python programs ony our system:

$ pyvenv env
$ source env/bin/activate

You should now see a (env) prepended to your shell prompt. You have to do this in every shell you use to work with pretix (or configure your shell to do so automatically). Depending on your Python version, you might need to replace pyvenv with python -m venv. If you are working on Ubuntu or Debian, we recommend upgrading your pip and setuptools installation inside the virtual environment:

(env)$ pip3 install -U pip setuptools

Now you can install the bank tool:

(env)$ pip3 install pretix-banktool

To configure it, run the following command:

(env)$ pretix-banktool setup

You will be asked a number of questions on your online banking access as well as for the URL of your pretix installation and your API key. The prompt will also tell you how to obtain that API key.

At the end, this command will write a config file to a location of your choice. You need to specify this config file for all further actions. The command:

(env)$ pretix-banktool test configfile-path.cfg

will test both the connection to the bank as well as the connection to pretix, but will not perform any actions. To actually upload data, use:

(env)$ pretix-banktool upload --days 30 configfile-path.cfg

The --days option specifies the timeframe of transaction to fetch from the bank. If you omit it, the tool will fetch the last 30 days.

Go to the “Import bank data” tab of the organizer settings in pretix to view any transactions that could not be automatically assigned to a ticket order.

Contributing

If you like to contribute to this project, you are very welcome to do so. If you have any questions in the process, please do not hesitate to ask us.

Please note that we have a Code of Conduct in place that applies to all project contributions, including issues, pull requests, etc.

License

Copyright 2017 Raphael Michel

Released under the terms of the GNU General Public License v3.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pretix-banktool-0.2.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pretix_banktool-0.2.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file pretix-banktool-0.2.1.tar.gz.

File metadata

File hashes

Hashes for pretix-banktool-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9cbbcd0c06e8d2c6f82bb92ca184c661f966ac85025863197d8fdb648878babc
MD5 b162042ee2853f7ecb761db0b0fd9dd4
BLAKE2b-256 69582f31aa35daaba8aa460ab6a788e6952e0130f9ed700ce92a357aab395174

See more details on using hashes here.

File details

Details for the file pretix_banktool-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pretix_banktool-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e9e801e163c03271a93bb0163cbeb5743987b61e2f49ff2d964f2c6b9f2fd9fd
MD5 417d1c89f876d96dbd9d452e918f33bb
BLAKE2b-256 6238b93b18e4c347221e4f83a528658d864b7e0784da8755d02029b9ab6e9287

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page