Skip to main content

statement-dl

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 <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)

Metadata

Release files for statement-dl 2020.4.5.post1

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 2020.4.5.post1
File Size Uploaded Provenance Actions
statement-dl-2020.4.5.post1.tar.gz 6.3 kB Without provenance Details for statement-dl-2020.4.5.post1.tar.gz

Built distribution (wheel)

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

Total release size: 14.5 kB

Release files / statement-dl-2020.4.5.post1.tar.gz

Download URL statement-dl-2020.4.5.post1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a0f677ea3f4f682d64fa8df8d17bdca9bda7b7ecdaaf764e3cd401804284f6a5
BLAKE2b-256 checksum
How to use checksums
1e1e6ee303ea9b0980314af0a2c71a8824a8071cbf5a345ba0d753524a579716
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

Release files / statement_dl-2020.4.5.post1-py3-none-any.whl

Download URL statement_dl-2020.4.5.post1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f48d7ebd0e7cddae7522ce245c819c4bbcf0aa3890c1d90ee1d116165167cb95
BLAKE2b-256 checksum
How to use checksums
99da0b67bad2f8ec26fd0f1a711fb3088aba5b52f1a5db39062af44ef6c7e6a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.5

Security for statement-dl 2020.4.5.post1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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