Skip to main content

naija-data (Python)

Accurate, sourced Nigerian reference data: 36 states + FCT, 774 LGAs, 8,809 wards, CBN-licensed banks with NUBAN validation, and mobile phone helpers. Zero dependencies.

Website and playground: https://naija-data.asgatcreation.workers.dev · REST API: https://naija-data-api.asgatcreation.workers.dev/v1

pip install naija-data
import naija_data as ng

ng.get_state("lagos").capital           # 'Ikeja'
[l.name for l in ng.lgas("FCT")]       # ['Abaji', 'Abuja Municipal', 'Bwari', ...]
ng.search("lagso")[0].name              # 'Lagos'  (typo-tolerant, knows aliases)
ng.wards("Ikeja", state="Lagos")[0].name  # 'Anifowoshe/Ikeja'

ng.get_bank("058").name                 # 'Guaranty Trust Bank Plc'
ng.is_valid_nuban("0000014579", "011")  # True  (CBN check-digit algorithm)
[b.name for b in ng.banks_for_nuban("0000014579")]  # banks this number could belong to

ng.normalize_phone("0803 123 4567")     # '+2348031234567'
ng.parse_phone("08031234567").network   # 'MTN' (allocation; numbers can be ported)
ng.parse_phone("01 269 1531").area      # 'Lagos' (landlines, 0800 toll-free and 0700 too)
ng.phone_error("0900 123 4567")         # 'reserved' (why a number is invalid)
ng.parse_plate("kja 123 ab").display    # 'KJA-123AB'

For Django and DRF fields see django-naija.

Command line:

naija lga lagos
naija bank 058
naija nuban 0000014579
naija phone 08031234567
naija plate DKN 135 3

Every record carries its sources and lists any unverified_fields. Full documentation, data sources and known gaps: https://github.com/asgatcreation/naija-data

Code: MIT. Data: CC BY 4.0 — credit "naija-data by Akanji Oluwaseun Gabriel".

Metadata

Release files for naija-data 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for naija-data 0.1.0
File Size Uploaded
naija_data-0.1.0.tar.gz 194.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for naija-data 0.1.0
File Interpreter ABI Platform
naija_data-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 392.1 kB

Release files / naija_data-0.1.0.tar.gz

Download URL naija_data-0.1.0.tar.gz
Size 194.5 kB
Tags Source
SHA-256 checksum
How to use checksums
744d43068e7db2c4d079ba389ba094cacfb7cf13c666428674def02e68835388
BLAKE2b-256 checksum
How to use checksums
970c9e1bf05a64bde3c52c5993f2abd334f67aeae5dd804defe3b92857500f02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / naija_data-0.1.0-py3-none-any.whl

Download URL naija_data-0.1.0-py3-none-any.whl
Size 197.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0b5d6406f7dc745551718a52eecf308a0ad16f5d91c6174f64cfca5c486c1d0
BLAKE2b-256 checksum
How to use checksums
6e4fe17b12b5a6aaae6829269aab3af9d0733a335981a6eb6e6c870774079bce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page