quantaroute-geocoding 1.0.7__tar.gz

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.
Files changed (25) hide show
  1. quantaroute_geocoding-1.0.7/COMPLETENESS_CHECK.md +140 -0
  2. quantaroute_geocoding-1.0.7/LICENSE +21 -0
  3. quantaroute_geocoding-1.0.7/MANIFEST.in +5 -0
  4. quantaroute_geocoding-1.0.7/PKG-INFO +572 -0
  5. quantaroute_geocoding-1.0.7/README.md +528 -0
  6. quantaroute_geocoding-1.0.7/examples/README.md +85 -0
  7. quantaroute_geocoding-1.0.7/examples/basic_usage.py +165 -0
  8. quantaroute_geocoding-1.0.7/examples/batch_location_lookup.py +193 -0
  9. quantaroute_geocoding-1.0.7/examples/location_lookup_demo.py +214 -0
  10. quantaroute_geocoding-1.0.7/pyproject.toml +59 -0
  11. quantaroute_geocoding-1.0.7/quantaroute_geocoding/__init__.py +34 -0
  12. quantaroute_geocoding-1.0.7/quantaroute_geocoding/cli.py +417 -0
  13. quantaroute_geocoding-1.0.7/quantaroute_geocoding/client.py +405 -0
  14. quantaroute_geocoding-1.0.7/quantaroute_geocoding/csv_processor.py +415 -0
  15. quantaroute_geocoding-1.0.7/quantaroute_geocoding/exceptions.py +42 -0
  16. quantaroute_geocoding-1.0.7/quantaroute_geocoding/location_lookup.py +287 -0
  17. quantaroute_geocoding-1.0.7/quantaroute_geocoding/offline.py +280 -0
  18. quantaroute_geocoding-1.0.7/quantaroute_geocoding.egg-info/PKG-INFO +572 -0
  19. quantaroute_geocoding-1.0.7/quantaroute_geocoding.egg-info/SOURCES.txt +23 -0
  20. quantaroute_geocoding-1.0.7/quantaroute_geocoding.egg-info/dependency_links.txt +1 -0
  21. quantaroute_geocoding-1.0.7/quantaroute_geocoding.egg-info/entry_points.txt +2 -0
  22. quantaroute_geocoding-1.0.7/quantaroute_geocoding.egg-info/requires.txt +12 -0
  23. quantaroute_geocoding-1.0.7/quantaroute_geocoding.egg-info/top_level.txt +1 -0
  24. quantaroute_geocoding-1.0.7/setup.cfg +4 -0
  25. quantaroute_geocoding-1.0.7/setup.py +56 -0
@@ -0,0 +1,140 @@
1
+ # Python Package Completeness Check - Summary
2
+
3
+ ## ✅ Issues Fixed
4
+
5
+ ### 1. Added Missing `get_health()` Method
6
+ - **Status**: ✅ Fixed
7
+ - **Location**: `quantaroute_geocoding/client.py`
8
+ - **Details**: Added `get_health()` method to `QuantaRouteClient` class to match Node.js package functionality
9
+ - **Method**: `client.get_health()` returns API health status
10
+
11
+ ### 2. Fixed `lookup_location_from_digipin()` Implementation
12
+ - **Status**: ✅ Fixed
13
+ - **Location**: `quantaroute_geocoding/client.py`
14
+ - **Issue**: Previously used offline processor to convert DigiPin to coordinates, then looked up coordinates
15
+ - **Fix**: Now uses API endpoint `/v1/location/lookup` directly with `digipin` in request body (more efficient)
16
+ - **Performance**: Improved - no unnecessary offline conversion step
17
+
18
+ ### 3. Fixed `LocationLookupClient.lookup_digipin()` Implementation
19
+ - **Status**: ✅ Fixed
20
+ - **Location**: `quantaroute_geocoding/location_lookup.py`
21
+ - **Issue**: Same as above - used offline processor unnecessarily
22
+ - **Fix**: Now uses API endpoint directly with `digipin` in request body
23
+ - **Performance**: Improved - direct API call
24
+
25
+ ### 4. Fixed `batch_location_lookup()` Implementation
26
+ - **Status**: ✅ Fixed
27
+ - **Location**: `quantaroute_geocoding/client.py`
28
+ - **Issue**: Previously converted DigiPin codes to coordinates offline before sending to API
29
+ - **Fix**: Now sends DigiPin codes directly to API endpoint `/v1/location/batch-lookup`
30
+ - **Performance**: Improved - batch processing is more efficient
31
+
32
+ ### 5. Fixed `LocationLookupClient.batch_lookup()` Implementation
33
+ - **Status**: ✅ Fixed
34
+ - **Location**: `quantaroute_geocoding/location_lookup.py`
35
+ - **Issue**: Same as above - converted DigiPin to coordinates offline
36
+ - **Fix**: Now sends DigiPin codes directly to API
37
+ - **Performance**: Improved - better batch processing
38
+
39
+ ### 6. Removed Webhook Methods
40
+ - **Status**: ✅ Fixed
41
+ - **Location**: `quantaroute_geocoding/client.py`
42
+ - **Details**: Removed `register_webhook()`, `list_webhooks()`, and `delete_webhook()` methods as per user request (skip webhooks for now)
43
+ - **Note**: Webhook functionality can be added back later if needed
44
+
45
+ ### 7. Fixed Version Mismatch
46
+ - **Status**: ✅ Fixed
47
+ - **Location**: `quantaroute_geocoding/__init__.py`
48
+ - **Issue**: `__init__.py` had version `1.0.5` while `setup.py` and `pyproject.toml` had `1.0.6`
49
+ - **Fix**: Updated `__init__.py` to version `1.0.6` to match setup files
50
+
51
+ ### 8. Updated README
52
+ - **Status**: ✅ Fixed
53
+ - **Location**: `README.md`
54
+ - **Details**:
55
+ - Updated changelog with version 1.0.6 fixes
56
+ - Added documentation for `get_health()` method
57
+ - Updated basic usage example to include health check
58
+
59
+ ## 📋 Feature Comparison with Node.js Package
60
+
61
+ ### ✅ Implemented Features (Matching Node.js)
62
+ - ✅ `geocode(address)` - Geocode address to DigiPin
63
+ - ✅ `coordinates_to_digipin(lat, lng)` - Convert coordinates to DigiPin
64
+ - ✅ `reverse_geocode(digipin)` - Reverse geocode DigiPin
65
+ - ✅ `lookup_location_from_coordinates(lat, lng)` - Location lookup from coordinates
66
+ - ✅ `lookup_location_from_digipin(digipin)` - Location lookup from DigiPin (FIXED)
67
+ - ✅ `batch_location_lookup(locations)` - Batch location lookup (FIXED)
68
+ - ✅ `get_location_statistics()` - Get location statistics
69
+ - ✅ `get_usage()` - Get API usage
70
+ - ✅ `get_health()` - Get API health (ADDED)
71
+
72
+ ### ✅ Python-Specific Features (Not in Node.js)
73
+ - ✅ `validate_digipin(digipin)` - Validate DigiPin format
74
+ - ✅ `batch_geocode(addresses)` - Batch geocode addresses
75
+ - ✅ `autocomplete(query, limit)` - Address autocomplete
76
+ - ✅ `OfflineProcessor` - Offline DigiPin processing
77
+ - ✅ `CSVProcessor` - CSV bulk processing
78
+ - ✅ `LocationLookupClient` - Dedicated location lookup client
79
+
80
+ ### ❌ Not Implemented (Skipped per User Request)
81
+ - ❌ Webhook management methods (user said skip for now)
82
+
83
+ ## 🎯 API Endpoints Coverage
84
+
85
+ ### ✅ Covered Endpoints
86
+ - ✅ `POST /v1/digipin/geocode` - Geocode address
87
+ - ✅ `POST /v1/digipin/coordinates-to-digipin` - Convert coordinates to DigiPin
88
+ - ✅ `POST /v1/digipin/reverse` - Reverse geocode DigiPin
89
+ - ✅ `GET /v1/digipin/validate/:digipin` - Validate DigiPin
90
+ - ✅ `POST /v1/digipin/batch` - Batch geocode
91
+ - ✅ `GET /v1/digipin/autocomplete` - Address autocomplete
92
+ - ✅ `GET /v1/digipin/usage` - Get usage
93
+ - ✅ `GET /health` - Health check (ADDED)
94
+ - ✅ `POST /v1/location/lookup` - Location lookup (FIXED)
95
+ - ✅ `POST /v1/location/batch-lookup` - Batch location lookup (FIXED)
96
+ - ✅ `GET /v1/location/stats` - Location statistics
97
+
98
+ ### ❌ Not Covered (Skipped)
99
+ - ❌ `/v1/digipin/webhooks/*` - Webhook management (user said skip)
100
+
101
+ ## 🚀 Performance Improvements
102
+
103
+ ### Before Fixes:
104
+ - DigiPin lookups: Offline conversion → API call (2 steps)
105
+ - Batch DigiPin lookups: Multiple offline conversions → API call (inefficient)
106
+
107
+ ### After Fixes:
108
+ - DigiPin lookups: Direct API call (1 step) ⚡
109
+ - Batch DigiPin lookups: Direct API call with DigiPin codes ⚡
110
+
111
+ ## 📝 Code Quality
112
+
113
+ - ✅ All methods properly validated
114
+ - ✅ Error handling consistent
115
+ - ✅ Type hints included
116
+ - ✅ Documentation strings complete
117
+ - ✅ Code compiles without errors
118
+ - ✅ Version consistency fixed
119
+
120
+ ## ✅ Summary
121
+
122
+ The Python package is now **complete** and **matches** the Node.js package functionality (excluding webhooks as requested). All location lookup methods now use API endpoints directly for better performance and consistency.
123
+
124
+ ### Key Improvements:
125
+ 1. ✅ Added missing `get_health()` method
126
+ 2. ✅ Fixed DigiPin lookup to use API directly (performance improvement)
127
+ 3. ✅ Fixed batch lookup to use API directly (performance improvement)
128
+ 4. ✅ Removed webhook methods (as requested)
129
+ 5. ✅ Fixed version consistency
130
+ 6. ✅ Updated documentation
131
+
132
+ ### Ready for:
133
+ - ✅ Testing
134
+ - ✅ Production use
135
+ - ✅ Package distribution
136
+
137
+ ## 🎉 Status: COMPLETE
138
+
139
+ The Python package is now complete and ready for use. All core functionality matches the Node.js package, with performance improvements for DigiPin lookups.
140
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 QuantaRoute
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ include README.md
2
+ include LICENSE
3
+ recursive-include quantaroute_geocoding *.py
4
+ recursive-exclude * __pycache__
5
+ recursive-exclude * *.py[co]