Skip to main content

naija-data (Python)

Accurate, sourced Nigerian reference data: 36 states + FCT, 774 LGAs, 8,809 wards, INEC's senatorial districts and federal and state constituencies, CBN-licensed banks with NUBAN validation, phone and plate validation. 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'

len(ng.federal_constituencies())        # 360 (House of Representatives seats)
[u.name for u in ng.lga_constituencies("Ikeja", "Lagos")]  # ['Lagos West', 'Ikeja', 'Ikeja I', 'Ikeja II']
ng.get_ward("24-11-01").federal_constituency  # 'FC236'

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 constituencies ikeja --state 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 1.0.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 1.0.0
File Size Uploaded
naija_data-1.0.0.tar.gz 242.7 kB Details

Built distribution (wheel)

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

Total release size: 491.9 kB

Release files / naija_data-1.0.0.tar.gz

Download URL naija_data-1.0.0.tar.gz
Size 242.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d9065a61cf4f34da6f90ae959fc10ecd4c95c66add5a70aa5ca562d2539f0e0c
BLAKE2b-256 checksum
How to use checksums
09ca0302be86ff37edb0f9f6c5fa69d35317c4e6cefb3e2ba0f3a42488268dfb
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 17, 2026.

Transparency log

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

Download URL naija_data-1.0.0-py3-none-any.whl
Size 249.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6598bab090620d905bc2e1ca24c2268ae27ae8a90b0b9dd9a835e9346e1bb34
BLAKE2b-256 checksum
How to use checksums
8f7e9f5e3a8b025f44cb5e8f0d9c5aa024a872febb2b21f4806aaeb16936f0f7
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 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.1

2 release files

0.1.0

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