nanpa

- Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.acid.vegas/-c.git
Log | Files | Refs | Archive | README | LICENSE

README.md (3948B)

      1 # NANPA API Client
      2 
      3 <p align="center">
      4   <img src="./.screens/nanpa.png">
      5 </p>
      6 
      7 A Python client for interacting with the North American Numbering Plan Administration (NANPA) public API system.
      8 
      9 ## Overview
     10 The North American Numbering Plan *(NANP)* is the unified telephone numbering system used by the United States, Canada, and many Caribbean territories. Established in 1997, NANPA serves as the administrator for this system, managing the allocation and assignment of area codes, central office codes, and other numbering resources to ensure efficient telecommunications routing and prevent number exhaustion.
     11 
     12 This client provides a simple interface to NANPA's public API endpoints, allowing developers to programmatically access critical numbering plan data and network information.
     13 
     14 ## Installation
     15 ```bash
     16 pip install nanpa
     17 ```
     18 
     19 or...
     20 
     21 ```bash
     22 git clone https://github.com/acidvegas/nanpa
     23 cd nanpa
     24 python setup.py install
     25 ```
     26 
     27 ## API Documentation
     28 
     29 ### State & Area Code Information
     30 The foundation of the NANP system revolves around geographic numbering assignments. The `get_states()` method returns all participating regions in the NANP, including US states and territories, Canadian provinces, and Caribbean nations. For more granular information, `get_area_codes_by_state(state)` provides all area codes assigned to a specific region, while `get_area_code_info(npa)` delivers detailed information about individual area codes including their service boundaries, implementation dates, and relief planning status.
     31 
     32 ### Rate Center Operations
     33 Rate centers form the geographic backbone of telephone billing and routing. Using `get_rate_centers(state)`, you can retrieve information about these fundamental units within any state, including their coordinates, associated area codes, and operating companies. The `get_rate_center_changes(start_date, end_date)` method tracks modifications to these configurations over time, such as consolidations, splits, and boundary adjustments.
     34 
     35 ### Number Block Management
     36 The NANP manages telephone numbers in blocks of 1,000 consecutive numbers. The `get_thousands_blocks(state, npa, report_type)` method provides information about these blocks, including carrier assignments and availability. For future planning, `get_pooling_forecast(state, npa)` projects number utilization and exhaust dates, while `get_current_pool_tracking(state, npa)` monitors active pool sizes and carrier participation.
     37 
     38 ### Network Infrastructure
     39 Location Routing Numbers *(LRNs)* are crucial for number portability in modern networks. The `get_lrn_forecast(state, npa)` method helps plan for routing efficiency and port capacity. Central office code assignments can be monitored through `get_co_code_forecast(state, npa)`, while `get_pstn_activation(state)` provides status updates on Public Switched Telephone Network readiness.
     40 
     41 ### Specialty Number Resources
     42 Beyond geographic numbers, NANPA manages special purpose codes. The 5XX NPA code family, accessed through various methods like `get_specialty_codes_available()`, `get_specialty_codes_assigned()`, and `get_specialty_codes_aging()`, serves non-geographic services. The 9YY codes, retrieved via `get_9yy_codes()`, are reserved for premium services, emergency preparedness, and network testing.
     43 
     44 ## Usage Example
     45 ```python
     46 from nanpa import NanpaAPI
     47 
     48 client = NanpaAPI()
     49 
     50 # Get rate centers in Florida
     51 fl_centers = client.get_rate_centers('FL')
     52 
     53 # Check thousands blocks for area code 239
     54 blocks = client.get_thousands_blocks('FL', '239')
     55 
     56 # Monitor rate center changes
     57 changes = client.get_rate_center_changes(
     58     '2024-12-01T00:00:00.000-05:00',
     59     '2024-12-31T23:59:59.999-05:00'
     60 )
     61 ```
     62 
     63 ---
     64 
     65 ###### Mirrors: [acid.vegas](https://git.acid.vegas/nanpa) • [SuperNETs](https://git.supernets.org/acidvegas/nanpa) • [GitHub](https://github.com/acidvegas/nanpa) • [GitLab](https://gitlab.com/acidvegas/nanpa) • [Codeberg](https://codeberg.org/acidvegas/nanpa)