Current collected state Current
Observed since 20 Oct, 21:12 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Offline-first African location verification for Python.
Offline-first African location verification for Python.
Validate country, state, city, and district (LGA) without an internet connection.
pip install afrogeo
Afrogeo provides a simple verify function that takes a dictionary and returns a Result object.
from afrogeo import verify
data = {
"country": "Nigeria",
"state": "Lagos",
"lga": "Agege"
}
result = verify(data)
if result.valid:
print(f"Validated: {result.normalized['state']} - {result.normalized['lga']}")
else:
print(f"Errors: {result.errors}")
data = {
"country": "NG", # Supports codes or full names
"state": "LA", # Supports state codes
"lga": "Agege",
"city": "Agege" # Optional
}
result = verify(data)
verify(user_input: dict) -> ResultThe user_input dictionary accepts:
country (Required): Full name or ISO code.state (Required): Full name or code.lga (Required): Local Government Area name.city (Optional): City name.Returns a Result object with:
valid: Boolean.errors: List of strings (empty if valid).normalized: Dictionary of standard location names and codes.Data is stored in afrogeo/data/. To add a new country, create a <country_code>.json file following the existing structure.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 28 May 2026 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 21:12 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ac02517b5c7ea6df47fa11c6fb99ec5673f308924e4db24969762b9e418cd61e