Skip to main content

Dataset of Nigerian states and local government areas (LGAs)

Project description

PyPI Python Versions Python package License

Nigeria States & LGAs (Python Package)

A simple Python package containing all 36 Nigerian States + FCT and their Local Government Areas (LGAs).

Installation

pip install nigeria-states-lgas

Usage

from nigeria_states_lgas import get_states, get_lgas, get_all, search_lga

# List all states
print(get_states())

# Get LGAs for a specific state
print(get_lgas("Kano"))

# Search which state(s) an LGA belongs to
print(search_lga("Ikot Ekpene"))

# Get the full dataset
all_data = get_all()
print(all_data["Lagos"])

CLI Usage

After installing the package a CLI nigeria-states-lgas is available:

# List all states
nigeria-states-lgas states

# List LGAs for a state
nigeria-states-lgas lgas Lagos

# Fuzzy search for an LGA
nigeria-states-lgas search-lga "Dala" --fuzzy

# Fuzzy search for states
nigeria-states-lgas search-states "Plateu" --fuzzy

Features

  • Provides all 36 Nigerian States + FCT.
  • Lists all Local Government Areas (LGAs) for each state.
  • Search for any LGA to find which state(s) it belongs to.
  • Easy integration into Python projects.

Contributing

Contributions are welcome! Please feel free to fork the repo and submit pull requests.

License

This project is licensed under the MIT License. See LICENSE for details.

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

nigeria_states_lgas-1.0.4.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

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

nigeria_states_lgas-1.0.4-py3-none-any.whl (5.5 MB view details)

Uploaded Python 3

File details

Details for the file nigeria_states_lgas-1.0.4.tar.gz.

File metadata

  • Download URL: nigeria_states_lgas-1.0.4.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for nigeria_states_lgas-1.0.4.tar.gz
Algorithm Hash digest
SHA256 11fa47f420edeb24270b0b09c40ee18c081aa836e2dbfc49e751e4b55209ea32
MD5 c72431420c825f900c4c7f47c8ffed6e
BLAKE2b-256 7cc69f850eb8d830cdde5b438eccf5a67ab8d2c58e73879b45e49f18bd378d74

See more details on using hashes here.

File details

Details for the file nigeria_states_lgas-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for nigeria_states_lgas-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 26d78cecd8c435adc1a3fb13a52de2daf7aab9d74248a753b1f0e8e3a63549b3
MD5 7c01292e62313137e8996780a227b7cd
BLAKE2b-256 e55ba5bcf24c4bf05679742636e14cb79d958072302e3d07bf5384caca335e83

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