Skip to main content

statement-dl

PyPI calver

This tool is built to be able to automatically download all documents from online banks and brokes that don't offer batch download options themselves, since it is usually quite cumbersome to download each file individually. The automatic download is especially useful when used in conjunction with portfolio tracking tools like portfolio performance that are able to subsequently import the downloaded PDFs. The downloaded files are sorted into separate subdirectories based on the document type.

Currently, only flatex is supported. PRs are welcome!

Installation

This Python tool currently uses Firefox and geckodriver to find and download your files. You can download Firefox from the mozilla homepage: https://www.mozilla.org/de/.

You can download geckodriver from Github: https://github.com/mozilla/geckodriver/releases.

Then, download statement-dl using pip: pip install -U statement-dl or simply clone the repository and install from source using pip install -U <repository-path>. If you don't want to install the tool and its dependencies into your global python environment, I recommended using pipx instead of pip directly.

Usage

To start off, you probably want to download all your previous documents. By default, the tool only downloads the unread files. To download all files from flatex, use the command

>>> statement_dl flatex <destination dir> --all-files

If you don't specify the --username and --password options, you will be prompted to enter them yourself in the browser.

To see all options, type

>>> statement_dl --help

To get all options for a specific broker/bank, type e.g.

>>> statement_dl flatex --help
usage: statement_dl flatex [-h] [-f DATE] [-t DATE] [-g PATH] [-u USERNAME]
                           [-p PASSWORD] [--wsl] [--headless] [-a] [-k] [--de]
                           dest

positional arguments:
  dest                  Directory in which your downloaded files will be saved

optional arguments:
  -h, --help            show this help message and exit
  -f DATE, --from-date DATE
                        Date from which you want to download your files (in
                        the format YYYY-MM-DD or 'today'). Defaults to
                        '2010-01-01'
  -t DATE, --to-date DATE
                        Date until which you want to download your files (in
                        the format YYYY-MM-DD or 'today'). Defaults to 'today'
  -g PATH, --geckodriver PATH
                        Path to geckodriver executable. If not specified, it
                        will look for it in the Path
  -u USERNAME, --username USERNAME
                        Username for automatic login
  -p PASSWORD, --password PASSWORD
                        Password for automatic login
  --wsl                 Set this option when running the script in WSL while
                        using a geckodriver executable that was installed on
                        Windows
  --headless            Launch browser in headless mode. This only works if
                        username and password are set
  -a, --all-files       Automatically download all files instead of only
                        unread
  -k, --keep-filenames  Keep the original filenames instead of renaming them
                        to a more useful format
  --de                  Use 'de' domain instead of 'at' (experimental)

Release files for statement-dl 2023.7.1

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

Source distribution (sdist)

Source distribution for statement-dl 2023.7.1
File Size Uploaded
statement-dl-2023.7.1.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for statement-dl 2023.7.1
File Interpreter ABI Platform
statement_dl-2023.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.6 kB

Release files / statement-dl-2023.7.1.tar.gz

Download URL statement-dl-2023.7.1.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a76aea05943057eaedb17d6dd0bbb0ac9568658cd6c89fa07f8500c3a3bdb215
BLAKE2b-256 checksum
How to use checksums
87656e4142c794343c1846ac6f7d93f449f9d5726d2a43ddee52253a3f27b4b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / statement_dl-2023.7.1-py3-none-any.whl

Download URL statement_dl-2023.7.1-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a19298c35de7d4581d9b54c204eecb4e55195520617f77b625e2dfc5132ceff
BLAKE2b-256 checksum
How to use checksums
414bb69a32192df9d244f6ad7d0e77d752ef24639b6cf3aa4dca678fb9c66a3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4
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