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.1

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.1
File Size Uploaded
naija_data-0.1.1.tar.gz 194.5 kB Details

Built distribution (wheel)

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

Total release size: 392.0 kB

Release files / naija_data-0.1.1.tar.gz

Download URL naija_data-0.1.1.tar.gz
Size 194.5 kB
Tags Source
SHA-256 checksum
How to use checksums
67e2c1dc1694fc06e6964ef68f67f1d33966fd445b336082945b6b72467572cd
BLAKE2b-256 checksum
How to use checksums
0b1746c18da751083f516ca386d26bbb86f419e37e6c2b7bc00226c7faa8ad2a
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.1-py3-none-any.whl

Download URL naija_data-0.1.1-py3-none-any.whl
Size 197.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53c2eb57f0cddd057d5264c2176565794c007283b06b03a9792df90140a655b6
BLAKE2b-256 checksum
How to use checksums
a24863ca435c8e1558eb32d9b7c646d7fbb2a57733f2e7dbf1e4c78cc870ed23
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

This release

0.1.1 This release

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