Skip to main content

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.11+, but 3.9+ 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.

Metadata

Release files for pretix-banktool 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pretix-banktool 1.1.0
File Size Uploaded
pretix_banktool-1.1.0.tar.gz 21.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pretix-banktool 1.1.0
File Interpreter ABI Platform
pretix_banktool-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.4 kB

Release files / pretix_banktool-1.1.0.tar.gz

Download URL pretix_banktool-1.1.0.tar.gz
Size 21.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bd1805dfb1c9dd8357d0e31d6beabd05e9f62355af8f9412ceba52c17d96626d
BLAKE2b-256 checksum
How to use checksums
84fcd050395497c3379f4408306e2d48e6f2ec72863b198db74014d624eaf96f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / pretix_banktool-1.1.0-py3-none-any.whl

Download URL pretix_banktool-1.1.0-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14d17e3a060805b332b42294def8473b3d1e04ae714e48229e13c6e3b3dc6495
BLAKE2b-256 checksum
How to use checksums
bcf4a41766cf344c20b1ab99d5eaa1baac7a45026939e21be3777817c409bcde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page