#validation #iban #polars #python #plugin #iban-validation-rs

iban_validation_rs

Facilitate validation of ibans and selecting Bank identifier and Branch identifier in Rust

11 releases

Uses new Rust 2024

0.1.11 Mar 29, 2025
0.1.10 Mar 24, 2025
0.1.6 Feb 28, 2025
0.1.2 Dec 26, 2024

#78 in Finance

Download history 56/week @ 2024-12-13 118/week @ 2024-12-20 62/week @ 2024-12-27 83/week @ 2025-02-07 94/week @ 2025-02-14 183/week @ 2025-02-21 194/week @ 2025-02-28 7/week @ 2025-03-07 228/week @ 2025-03-14 230/week @ 2025-03-21 155/week @ 2025-03-28

621 downloads per month

MIT license

55KB
1.5K SLoC

Iban Validation rs

Facilitate validation of ibans and getting the bank identifier and branch identifier in Rust.

See documentation for implementation details and a short example.

Use Cases

The package is not a general-purpose library to parse IBANs. The intention is not for a user-facing library (in other words, for backends, not frontends). Hence, the 'print' format, loosely documented in the Iban Registry, is not implemented. Further, both the input and output of the library are intended to be in the 'electronic' format. BBAN (Basic Bank Account Number) validation only validates that the length, the position of the bank identifier, and the branch identifiers are correct. Further country-specific validations are not performed.

In contrast, the intention is to provide a quick, correct validation of the IBAN. Ideally, using minimal memory and CPU and reading the input only once. To integrate easily with other packages, it aims to keep dependencies low. A Python script pre-processed data for the library to decouple the main library and limit code change when a new version of the IBAN registry is released.

For now, parallelisation is not in the scope of the core library as usage through other libraries is likely to provide that, like in the polars plugin.

Changes

  • 0.1.11: eliminated rust dependecies (rust code generated from Python instead of Hash and Serde)
  • 0.1.9: improve mod97 perf (reduce memory needed)
  • 0.1.8: improve mod97 perf (cpu memory tradeoff).
  • 0.1.7: improve performance related to the Iban structure again.
  • 0.1.6: improve performance related to the Iban structure.
  • 0.1.5: improved documentation
  • 0.1.4: technical update; updated polars dependency to polars 0.46.0, and py03 0.23 impacting only the Python packages.
  • 0.1.3: Updated to latest Iban Register v99 from Dec 2024

No runtime deps