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.2.0.tar.gz (13.0 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.2.0-py3-none-any.whl (13.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ifscfinder-0.2.0.tar.gz
  • Upload date:
  • Size: 13.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ifscfinder-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d677216437fa0a422721d83886cd44eea3f04a9b874d557256ee71fc82197bc3
MD5 cd0cf65bffe9203622a7e3aec45acbe3
BLAKE2b-256 24c71db38adfca7434d5c0846b6f268af0b0acc5118a90ed1e944432e96100d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ifscfinder-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ifscfinder-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97d250337a7399964921d704e12615204db84811311c89a6675298c6c828aff6
MD5 ec55a80180c8326b1c5eb15cf23f918e
BLAKE2b-256 914ac12253a0eca28bd09951192764303e86eee3f4cc42490d726e2a19835407

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