Add German bank code (Bankleitzahl) module with the Bundesbank register - #510
Open
cammac-creator wants to merge 1 commit into
Open
Add German bank code (Bankleitzahl) module with the Bundesbank register#510cammac-creator wants to merge 1 commit into
cammac-creator wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: a new
stdnum.de.blzmodule and the data behind it.stdnum/de/blz.py:compact,validate,is_valid,info,to_bicfor the 8-digit German bank code (positions 5 to 12 of a German IBAN), on the model ofstdnum.be.iban/stdnum.cz.bankaccount.stdnum/de/banks.dat: 3,506 allocated codes withbic,bank,city, plusdeleted="True"for the 75 codes the Bundesbank marks for deletion andsuccessorfor 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 theMerkmal = 1rows (one per code;Merkmal = 2rows are branches using another institution's code).tests/test_de_blz.doctest,docs/stdnum.de.blz.rst, and the entry indocs/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.doctestpasses;flake8clean with the project's configuration.🤖 Generated with Claude Code
https://claude.ai/code/session_01MY1YBwTBrzUvG19RpXy8KA