Skip to main content

information about states, local government areas (LGAs) towns and zip codes in Nigeria.

Project description

Nigerian Zip Codes (zipcode-ng)

The zipcode-ng library provides information about states, local government areas (LGAs) towns and zip codes in Nigeria.

Installation

You can install the package via pip:

pip install zipcode-ng

Usage

Importing

from zipcode_ng import (
    get_state_data,
    get_all_state_data
)

# Retrieve data for a specific state
lagos_state_data = get_state_data("Lagos")
print("Lagos State Data:", lagos_state_data)

# Retrieve data for all states
all_states_data = get_all_state_data()
print("All States Data:", all_states_data)

Functions

  • get_state_data(identifier: Union[str, StateName]) -> StateInfo: Returns information about a specific state based on its name or postal code.

  • get_all_state_data() -> List[StateInfo]: Returns information about all states in Nigeria.

Type Definitions

  • StateInfo: Represents the data structure for information about a state, including its name, language, tribe, description, region, etc.

  • StateName: Literal type representing the names of Nigerian states.

JSON Data

The state information returned by the library is sourced from a JSON file included with the package. The JSON file contains details about each state, including local government areas and towns within them.

Contributing

Contributions are welcome! If you'd like to contribute to this project, please fork the repository and submit a pull request with your changes.

GitHub Repository

You can find the source code and contribute to this project on GitHub: Nigerian Zip Codes on GitHub

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

zipcode_ng-0.0.1.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

zipcode_ng-0.0.1-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page