Skip to content

Add German bank code (Bankleitzahl) module with the Bundesbank register - #510

Open
cammac-creator wants to merge 1 commit into
arthurdejong:masterfrom
cammac-creator:de-blz
Open

Add German bank code (Bankleitzahl) module with the Bundesbank register#510
cammac-creator wants to merge 1 commit into
arthurdejong:masterfrom
cammac-creator:de-blz

Conversation

@cammac-creator

Copy link
Copy Markdown

What: a new stdnum.de.blz module and the data behind it.

  • stdnum/de/blz.py: compact, validate, is_valid, info, to_bic for the 8-digit German bank code (positions 5 to 12 of a German IBAN), on the model of stdnum.be.iban / stdnum.cz.bankaccount.
  • stdnum/de/banks.dat: 3,506 allocated codes with bic, bank, city, plus deleted="True" for the 75 codes the Bundesbank marks for deletion and successor for the 34 of them that name a successor code.
  • update/de_banks.py: regenerates the data file. The file's URL changes with every edition, so the script reads the current link from the Bundesbank download page (https://www.bundesbank.de/de/aufgaben/unbarer-zahlungsverkehr/serviceangebot/bankleitzahlen/download-bankleitzahlen-602592) and keeps the Merkmal = 1 rows (one per code; Merkmal = 2 rows are branches using another institution's code).
  • tests/test_de_blz.doctest, docs/stdnum.de.blz.rst, and the entry in docs/index.rst.

Source and terms: the Bankleitzahlendatei is published by the Deutsche Bundesbank on the page above (CSV, Latin-1, semicolon-separated); the data file header names the source, as the other registers in this repository do.

Tests: pytest --doctest-modules stdnum/de/blz.py tests/test_de_blz.doctest passes; flake8 clean with the project's configuration.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MY1YBwTBrzUvG19RpXy8KA

The Deutsche Bundesbank publishes the register of allocated German bank
codes (Bankleitzahlen) with the institution, its BIC and its place, and
marks codes that are about to be deleted with their successor code.

This adds stdnum.de.blz (compact, validate, is_valid, info, to_bic) on the
model of the Belgian and Czech bank code data, the update/de_banks.py
script that regenerates stdnum/de/banks.dat from the CSV edition linked on
the Bundesbank download page, and the doctests.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MY1YBwTBrzUvG19RpXy8KA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant