Skip to main content

Contributors Forks Stargazers Issues MIT License PyPI


Logo

israeli-bank-scrapers-python

Leumi bank + Isracard credit-card scraping, as a FastAPI service
Explore the API docs »

curl examples · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Python port of the israeli-bank-scrapers TypeScript library's Leumi and Isracard scrapers, packaged as a standalone FastAPI service rather than a Node.js library. Playwright drives a real Chromium browser to log in and pull transactions, balances, standing orders, loans, deposits, and mortgages (Leumi); the service preserves the HTTP contract of the original TypeScript/Express service it replaces, so existing callers don't need to change anything besides where they point.

Before using this against real credentials, read docs/api.md — what each provider needs, what every endpoint returns, error types, and the config env vars.

(back to top)

Built With

  • Python
  • FastAPI
  • Pydantic
  • Playwright
  • Docker

(back to top)

Scope

Ported so far: Leumi (bank) and Isracard (credit card). The TypeScript reference this project is porting from (ts/, still live in this repo) supports many more Israeli banks and card issuers — see Roadmap. See PROGRESS.md for the full migration status, architecture notes, and release process.

(back to top)

Getting Started

Prerequisites

  • Python 3.11+
  • A Chromium-capable environment — Playwright downloads its own Chromium build, so you just need the OS-level dependencies its installer pulls in:
    python -m playwright install --with-deps chromium
    

Installation

To use the published package (as a service or a library):

pip install israeli-bank-scrapers-python
python -m playwright install --with-deps chromium

To work on the project itself (contributing, running the test suite):

git clone https://github.com/mfinkelstine/israeli-bank-scrapers.git
cd israeli-bank-scrapers
pip install -e ".[dev,test]"
python -m playwright install --with-deps chromium

Run the test suite:

pytest

(back to top)

Configuration

To run real scrapes locally — either through the test suite's live tests or the scripts/curl-api.sh helper behind CURL_COMMANDS.md — copy .env.example to .env and fill in test credentials:

cp .env.example .env
LEUMI_USERNAME=
LEUMI_PASSWORD=
ISRACARD_ID=
ISRACARD_PASSWORD=
ISRACARD_CARD6DIGITS=

This .env file is a local dev/test convenience only — the deployed service itself never reads credentials from the environment; it takes them per-request in the request body (see docs/api.md). The one exception is GET /healthz's optional deep-check config (HEALTHZ_COMPANY/HEALTHZ_USERNAME/HEALTHZ_ID/HEALTHZ_PASSWORD/HEALTHZ_CARD6), also documented there. Never commit .env or paste real credentials into an issue, PR, or log.

(back to top)

Usage

Run the service

uvicorn israeli_bank_scrapers.api.app:app --host 0.0.0.0 --port 3002

Or via Docker (installs the published PyPI package, not local source):

docker build -t israeli-bank-scrapers .
docker run -p 3002:3002 israeli-bank-scrapers

Endpoints: GET /health, GET|POST /healthz, POST /scrape, POST /standing-orders, POST /cards, POST /balance, POST /portfolio, GET /openapi.json, GET /docs.

Call the API

curl -sS -X POST http://127.0.0.1:3002/scrape \
  -H "Content-Type: application/json" \
  -d '{"company": "leumi", "credentials": {"username": "...", "password": "..."}, "months": 1}'

For what credentials each provider needs and what every endpoint returns, see docs/api.md. For more copy-paste examples (every endpoint, both providers), see CURL_COMMANDS.md.

Use as a library

from israeli_bank_scrapers.browser import BrowserSession
from israeli_bank_scrapers.providers.leumi import LeumiProvider

async with BrowserSession() as page:
    provider = LeumiProvider()
    result = await provider.scrape_transactions(page, username, password, start_date=...)

(back to top)

Roadmap

  • Leumi (bank)
  • Isracard (credit card)
  • Additional banks/card issuers from the TypeScript reference (ts/src/definitions.ts), not yet ported: Hapoalim, Beinleumi, Union, Amex, Visa Cal, Max, Otsar Hahayal, Discount, Mercantile, Mizrahi, Massad, Yahav, Behatsdaa, Beyahad Bishvilha, OneZero, Pagi

See the open issues for a full list of proposed features and known issues, and PROGRESS.md for the detailed migration log.

(back to top)

Contributing

Contributions are welcome. If you have a suggestion that would make this better, fork the repo and open a pull request, or open an issue with the "enhancement" tag.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Meir Finkelstine - mfinkelstine@gmail.com

Project Link: https://github.com/mfinkelstine/israeli-bank-scrapers

(back to top)

Acknowledgments

(back to top)

Metadata

Release files for israeli-bank-scrapers-python 0.1.18

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

Source distribution (sdist)

Source distribution for israeli-bank-scrapers-python 0.1.18
File Size Uploaded Provenance Actions
israeli_bank_scrapers_python-0.1.18.tar.gz 99.2 kB Without provenance Details for israeli_bank_scrapers_python-0.1.18.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for israeli-bank-scrapers-python 0.1.18
File Interpreter ABI Platform Actions
israeli_bank_scrapers_python-0.1.18-py3-none-any.whl Python 3 none any Details for israeli_bank_scrapers_python-0.1.18-py3-none-any.whl

Total release size: 168.8 kB

Release files / israeli_bank_scrapers_python-0.1.18.tar.gz

Download URL israeli_bank_scrapers_python-0.1.18.tar.gz
Size 99.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b4a0298e55c84ab368ae5c917b9101a5754cb90159ee3a51338740b8cce0f733
BLAKE2b-256 checksum
How to use checksums
6d501a01e93e67c6310d99fdef5592da3b4d3fba31c9cf00b7f5c6568bccdeed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / israeli_bank_scrapers_python-0.1.18-py3-none-any.whl

Download URL israeli_bank_scrapers_python-0.1.18-py3-none-any.whl
Size 69.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83e522a4c16fe711ea1d2c83e91fcef27f044ffd03d0a371ef8d367e03d57279
BLAKE2b-256 checksum
How to use checksums
958b7c32b04d42754a0986b19aa31de659572d1bc55c2131061df12e339d2c8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for israeli-bank-scrapers-python 0.1.18

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