Skip to main content

High-performance IFSC code lookup utilities backed by SQLite.

Project description

IFSCFinder (Python)

IFSCFinder is a high-performance Python package that provides lightning-fast IFSC code lookups through an embedded SQLite database. With sub-millisecond query times and 40x cache acceleration, it's optimized for banking automation, fintech analytics, and high-throughput microservice architectures.

Performance Metrics:

  • Average lookup time: 0.01ms per query
  • Throughput: 136,845 lookups/second (uncached), 5.5M/second (cached)
  • Cache speedup: 40x faster for repeated queries
  • Database size: 42MB compressed SQLite with full Indian banking network coverage
  • Memory footprint: Minimal with configurable caching

Installation

pip install git+https://github.com/IntegerAlex/IFSCFinder.git#subdirectory=python

For local development:

cd /home/akshat/projects/ifsc/python
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Usage

from ifscfinder import ifsc_to_details, ifsc_to_bank

details = ifsc_to_details("SBIN0000001")
bank_name = ifsc_to_bank("SBIN0000001")
  • ifsc_to_details(code) returns a dictionary with BANK, BRANCH, ADDRESS, CITY1, CITY2, STATE, and STD_CODE keys.
  • Field-specific helpers (ifsc_to_bank, ifsc_to_branch, ifsc_to_state, etc.) offer ergonomic access.
  • clear_lookup_cache() invalidates the in-memory cache when the database changes.
  • get_database(db_path=None) returns the underlying IFSCDatabase singleton if you need lower-level control.

Data Source

The packaged SQLite database lives under ifscfinder/data/ifsc.db. Replace this file with an updated dataset to refresh lookups. The package automatically validates the presence of the database and raises a descriptive FileNotFoundError if it is missing.

Testing & Quality

  • Run python3 -m compileall src/ifscfinder to sanity check syntax.
  • Upcoming automated tests will live under python/tests and be executed via pytest.
  • The code uses strict IFSC normalization and structured logging to aid production diagnostics.

Roadmap

  • Publish the package to PyPI with automated GitHub Actions builds.
  • Provide a JSON export pipeline to feed JavaScript, Go, and Rust ports.
  • Synchronize API contracts across the forthcoming TypeScript client and other language bindings.

Contributing

  1. Fork the repository and create a feature branch.
  2. Run sanity checks before submitting a pull request.
  3. Document any API changes in this README and sync cross-language specs.

License

LGPL-2.1 License. See LICENSE in the project root.

Copyright Notice: Copyright (c) 2024 Akshat Kotpalliwar. All rights reserved.

This package is distributed under the GNU Lesser General Public License v2.1. See the LICENSE file for full copyright information and license terms.

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

ifscfinder-0.1.0.tar.gz (12.4 MB view details)

Uploaded Source

Built Distribution

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

ifscfinder-0.1.0-py3-none-any.whl (12.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ifscfinder-0.1.0.tar.gz
  • Upload date:
  • Size: 12.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ifscfinder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e771884194d95517c3b34d8b9a3e767856edc654e9f5539b516a50aba5c7f554
MD5 5dcafc2a96994ed2f63ea685b3a77799
BLAKE2b-256 b78ef67d7d4407a20b06560c2ca643bd056927c2b1c2d3cade89e6077d1d8bf6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ifscfinder-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for ifscfinder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc5f7c29fdc6635b5746cc6a84238f11b21c57769ba78046978530556a680516
MD5 c8167ce7ad365ec91f7ce5d6ae654ed8
BLAKE2b-256 e5d74d4077ace51ac37ad60c9129652b8b4e208f4f5bfff8a84e17ed3a23e8f6

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