Skip to main content

Quick & reliable operations csv exporter for mBank.

Project description

mbank-csv-export

Many projects successfully attempt to parse the crappy mBank CSV operations, but few reliably automate the extraction process.

This library does only one thing - exports transaction CSV files from mBank as a string.

  • Uses Playwright for automated browser interactions.
  • Saves browser state to maintain session continuity, minimizing the need for repeated mobile authentication.

Usage

Library

from datetime import date

from mbank_csv_export import MBank

mbank = MBank(headless=False)
mbank.login(username="1111222233334444", password="***")
csv_content: str = mbank.export_operations_csv(
    date_from=date(2023, 6, 1), 
    date_to=date(2024, 6, 1)
)
print(csv_content)

CLI

> mbank --help
usage: mbank [-h] [--headless] [--username USERNAME] [--password PASSWORD] [--log-level {ERROR,WARN,INFO,DEBUG}] [--date-from DATE_FROM] [--date-to DATE_TO] [--verbose]

options:
  -h, --help            show this help message and exit
  --headless
  --username USERNAME   or set MBANK_USERNAME env variable
  --password PASSWORD   or set MBANK_PASSWORD env variable
  --log-level {ERROR,WARN,INFO,DEBUG}
                        or set MBANK_LOG_LEVEL env variable
  --date-from DATE_FROM
                        format YYYY-MM-DD, defaults to date 1 month ago.
  --date-to DATE_TO     format YYYY-MM-DD, defaults to date today.
  --verbose

Contribute

Pull requests and issues are highly appreciated. To add your changes:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix (git checkout -b feature-name).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature-name).
  5. Open a pull request on GitHub.

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

mbank_csv_export-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

mbank_csv_export-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file mbank_csv_export-0.1.0.tar.gz.

File metadata

  • Download URL: mbank_csv_export-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0

File hashes

Hashes for mbank_csv_export-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f24e4ded45860a94bbad52b0af0ac5412ee9823358a1ed2d9489af1e38da8fab
MD5 49aec6293944deb26a9cff8a87294079
BLAKE2b-256 a9e1603c0da129a8e73ee49c6c2cf27c2b45ba9bfc651d10aca79c90dbdb1041

See more details on using hashes here.

File details

Details for the file mbank_csv_export-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mbank_csv_export-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.5.0

File hashes

Hashes for mbank_csv_export-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 468b80bee09bd2be2b8441536edf3d610a9b272e9845488f3146bd656c23923c
MD5 1fb937e111939a906d6d7a2a05640361
BLAKE2b-256 767b9a2c91f8ca5502931de0069127d38ae94fd38c7099e69ddf25d8c5524872

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