naija-data 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
naija_data/__init__.py ADDED
@@ -0,0 +1,40 @@
1
+ """naija-data: accurate, sourced Nigerian reference data.
2
+
3
+ >>> import naija_data as ng
4
+ >>> ng.get_state("lagos").capital
5
+ 'Ikeja'
6
+ >>> [l.name for l in ng.lgas("FCT")][:2]
7
+ ['Abaji', 'Abuja Municipal']
8
+ >>> ng.is_valid_nuban("0000014579", "011")
9
+ True
10
+
11
+ Data: CC BY 4.0, Akanji Oluwaseun Gabriel, compiled from INEC, CBN, NCC, OCHA and other sources
12
+ (see meta()["sources"]). Code: MIT.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ from ._load import load as _load
18
+ from .admin import find_lgas, get_lga, get_state, get_ward, lgas, search, search_wards, states, wards
19
+ from .banks import (BANK_TYPES, banks, banks_for_nuban, find_banks, get_bank, is_valid_nuban,
20
+ nuban_check_digit)
21
+ from .models import LGA, AreaCode, Bank, PhoneNumber, Plate, PlateCategory, SearchResult, State, Ward
22
+ from .phone import (PHONE_ERRORS, PHONE_TYPES, area_codes, is_valid_phone, networks, normalize_phone, parse_phone,
23
+ phone_error, prefixes, to_local)
24
+ from .plates import PLATE_ERRORS, PLATE_FORMATS, is_valid_plate, parse_plate, plate_categories, plate_error
25
+
26
+ __version__ = "0.1.0"
27
+
28
+ __all__ = [
29
+ "BANK_TYPES", "PHONE_ERRORS", "PHONE_TYPES", "PLATE_ERRORS", "PLATE_FORMATS",
30
+ "LGA", "AreaCode", "Bank", "PhoneNumber", "Plate", "PlateCategory", "SearchResult", "State", "Ward",
31
+ "area_codes", "banks", "banks_for_nuban", "find_banks", "find_lgas", "get_bank", "get_lga", "get_state",
32
+ "get_ward", "is_valid_nuban", "is_valid_phone", "is_valid_plate", "lgas", "meta", "networks",
33
+ "normalize_phone", "nuban_check_digit", "parse_phone", "parse_plate", "phone_error", "plate_categories",
34
+ "plate_error", "prefixes", "search", "search_wards", "states", "to_local", "wards",
35
+ ]
36
+
37
+
38
+ def meta() -> dict:
39
+ """Dataset version, row counts, licence, attribution and sources."""
40
+ return _load("meta")
naija_data/__main__.py ADDED
@@ -0,0 +1,3 @@
1
+ from .cli import main
2
+
3
+ raise SystemExit(main())