geocodio-library-python 0.7.0__tar.gz → 1.3.0__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.
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/CHANGELOG.md +19 -2
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/PKG-INFO +21 -6
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/README.md +19 -4
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/pyproject.toml +4 -1
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/smoke_lists.py +2 -2
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/src/geocodio/_version.py +1 -1
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/src/geocodio/client.py +330 -146
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/src/geocodio/distance.py +5 -5
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/src/geocodio/exceptions.py +4 -2
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/src/geocodio/models.py +48 -16
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/__init__.py +1 -1
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/conftest.py +5 -3
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/e2e/test_api.py +89 -69
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/e2e/test_batch_reverse.py +31 -21
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/e2e/test_distance.py +25 -31
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/e2e/test_lists_api.py +12 -10
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/test_workflows.py +34 -19
- geocodio_library_python-1.3.0/tests/unit/test_client.py +363 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/unit/test_distance.py +124 -103
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/unit/test_errors.py +15 -10
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/unit/test_exceptions.py +7 -10
- geocodio_library_python-1.3.0/tests/unit/test_geocode.py +1005 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/unit/test_geocoding.py +12 -9
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/unit/test_models.py +74 -39
- geocodio_library_python-1.3.0/tests/unit/test_reverse.py +283 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/uv.lock +2 -2
- geocodio_library_python-0.7.0/tests/unit/test_client.py +0 -332
- geocodio_library_python-0.7.0/tests/unit/test_geocode.py +0 -710
- geocodio_library_python-0.7.0/tests/unit/test_reverse.py +0 -257
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/.github/workflows/ci.yml +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/.github/workflows/publish.yml +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/.github/workflows/test-act-event-ci.json +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/.github/workflows/test-act-event-publish.json +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/.gitignore +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/LICENSE +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/requirements-dev.txt +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/setup.cfg +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/smoke.py +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/src/geocodio/__init__.py +7 -7
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/test_pypi_release.py +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/e2e/__init__.py +0 -0
- {geocodio_library_python-0.7.0 → geocodio_library_python-1.3.0}/tests/unit/__init__.py +0 -0
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.0] - 2026-08-25
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- United Kingdom data append support. The `uk-westminster`, `uk-devolved`, and `uk-local` appends (and their `-next` variants) are now parsed into a typed `UKLegislativeDistrict` model, exposed via `fields.uk_westminster`, `fields.uk_devolved`, and `fields.uk_local`.
|
|
14
|
+
|
|
15
|
+
## [1.0.0] - 2026-06-05
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **BREAKING**: Migrated to Geocodio API **v2**. The base URL version prefix changed from `v1.x` to `v2` (`https://api.geocod.io/v2/...`).
|
|
19
|
+
- **BREAKING**: Removed the top-level `input` object from `/geocode` and `/reverse` responses. `GeocodingResponse.input` has been removed; parsed address information now lives in `results[].address_components`.
|
|
20
|
+
- **BREAKING**: Renamed `AddressComponents` fields to match API v2:
|
|
21
|
+
- `zip` → `postal_code`
|
|
22
|
+
- `state` → `state_province`
|
|
23
|
+
- Added `unit_type` (was `secondaryunit`) and `unit_number` (was `secondarynumber`)
|
|
24
|
+
- Structured address input now accepts `state_province` (the legacy `state` field is still accepted for compatibility).
|
|
25
|
+
|
|
10
26
|
## [0.7.0] - 2026-03-12
|
|
11
27
|
|
|
12
28
|
### Changed
|
|
@@ -16,7 +32,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
16
32
|
|
|
17
33
|
### Changed
|
|
18
34
|
- Updated default API version from v1.9 to v1.10
|
|
19
|
-
|
|
20
35
|
## [0.5.1] - 2026-02-18
|
|
21
36
|
|
|
22
37
|
### Fixed
|
|
@@ -69,7 +84,9 @@ When ready to release:
|
|
|
69
84
|
5. Push tags: `git push --tags`
|
|
70
85
|
6. GitHub Actions will automatically publish to PyPI
|
|
71
86
|
|
|
72
|
-
[Unreleased]: https://github.com/Geocodio/geocodio-library-python/compare/
|
|
87
|
+
[Unreleased]: https://github.com/Geocodio/geocodio-library-python/compare/v1.3.0...HEAD
|
|
88
|
+
[1.3.0]: https://github.com/Geocodio/geocodio-library-python/compare/v1.2.0...v1.3.0
|
|
89
|
+
[1.0.0]: https://github.com/Geocodio/geocodio-library-python/compare/v0.7.0...v1.0.0
|
|
73
90
|
[0.7.0]: https://github.com/Geocodio/geocodio-library-python/compare/v0.6.0...v0.7.0
|
|
74
91
|
[0.6.0]: https://github.com/Geocodio/geocodio-library-python/compare/v0.5.1...v0.6.0
|
|
75
92
|
[0.5.1]: https://github.com/Geocodio/geocodio-library-python/compare/v0.5.0...v0.5.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: geocodio-library-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: A Python client for the Geocodio API
|
|
5
5
|
Project-URL: Homepage, https://www.geocod.io
|
|
6
6
|
Project-URL: Documentation, https://www.geocod.io/docs/?python
|
|
@@ -100,6 +100,7 @@ To batch geocode, simply pass a list of addresses or coordinates instead of a si
|
|
|
100
100
|
response = client.geocode([
|
|
101
101
|
"1109 N Highland St, Arlington VA",
|
|
102
102
|
"525 University Ave, Toronto, ON, Canada",
|
|
103
|
+
"10 Downing St, London, United Kingdom",
|
|
103
104
|
"4410 S Highway 17 92, Casselberry FL",
|
|
104
105
|
"15000 NE 24th Street, Redmond WA",
|
|
105
106
|
"17015 Walnut Grove Drive, Morgan Hill CA"
|
|
@@ -116,15 +117,16 @@ response = client.reverse([
|
|
|
116
117
|
response = client.geocode({
|
|
117
118
|
"MyId1": "1109 N Highland St, Arlington VA",
|
|
118
119
|
"MyId2": "525 University Ave, Toronto, ON, Canada",
|
|
119
|
-
"MyId3": "
|
|
120
|
-
"MyId4": "
|
|
121
|
-
"MyId5": "
|
|
120
|
+
"MyId3": "10 Downing St, London, United Kingdom",
|
|
121
|
+
"MyId4": "4410 S Highway 17 92, Casselberry FL",
|
|
122
|
+
"MyId5": "15000 NE 24th Street, Redmond WA",
|
|
123
|
+
"MyId6": "17015 Walnut Grove Drive, Morgan Hill CA"
|
|
122
124
|
})
|
|
123
125
|
```
|
|
124
126
|
|
|
125
127
|
### Field appends
|
|
126
128
|
|
|
127
|
-
Geocodio allows you to append additional data points such as congressional districts, census codes, timezone, ACS survey results and [much more](https://www.geocod.io/docs/#fields).
|
|
129
|
+
Geocodio allows you to append additional data points such as congressional districts, census codes, timezone, ACS survey results, UK constituencies and wards, and [much more](https://www.geocod.io/docs/#fields).
|
|
128
130
|
|
|
129
131
|
To request additional fields, simply supply them as a list:
|
|
130
132
|
|
|
@@ -138,6 +140,13 @@ response = client.geocode(
|
|
|
138
140
|
)
|
|
139
141
|
|
|
140
142
|
response = client.reverse("38.9002898,-76.9990361", fields=["census2010"])
|
|
143
|
+
|
|
144
|
+
# United Kingdom addresses support UK-specific appends such as Westminster and
|
|
145
|
+
# devolved parliament constituencies, and local authority wards
|
|
146
|
+
response = client.geocode(
|
|
147
|
+
"10 Downing St, London, United Kingdom",
|
|
148
|
+
fields=["uk-westminster", "uk-local"]
|
|
149
|
+
)
|
|
141
150
|
```
|
|
142
151
|
|
|
143
152
|
### Address components
|
|
@@ -163,6 +172,12 @@ response = client.geocode([
|
|
|
163
172
|
"city": "Toronto",
|
|
164
173
|
"state": "ON",
|
|
165
174
|
"country": "Canada"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"street": "10 Downing St",
|
|
178
|
+
"city": "London",
|
|
179
|
+
"postal_code": "SW1A 2AA",
|
|
180
|
+
"country": "United Kingdom"
|
|
166
181
|
}
|
|
167
182
|
])
|
|
168
183
|
```
|
|
@@ -65,6 +65,7 @@ To batch geocode, simply pass a list of addresses or coordinates instead of a si
|
|
|
65
65
|
response = client.geocode([
|
|
66
66
|
"1109 N Highland St, Arlington VA",
|
|
67
67
|
"525 University Ave, Toronto, ON, Canada",
|
|
68
|
+
"10 Downing St, London, United Kingdom",
|
|
68
69
|
"4410 S Highway 17 92, Casselberry FL",
|
|
69
70
|
"15000 NE 24th Street, Redmond WA",
|
|
70
71
|
"17015 Walnut Grove Drive, Morgan Hill CA"
|
|
@@ -81,15 +82,16 @@ response = client.reverse([
|
|
|
81
82
|
response = client.geocode({
|
|
82
83
|
"MyId1": "1109 N Highland St, Arlington VA",
|
|
83
84
|
"MyId2": "525 University Ave, Toronto, ON, Canada",
|
|
84
|
-
"MyId3": "
|
|
85
|
-
"MyId4": "
|
|
86
|
-
"MyId5": "
|
|
85
|
+
"MyId3": "10 Downing St, London, United Kingdom",
|
|
86
|
+
"MyId4": "4410 S Highway 17 92, Casselberry FL",
|
|
87
|
+
"MyId5": "15000 NE 24th Street, Redmond WA",
|
|
88
|
+
"MyId6": "17015 Walnut Grove Drive, Morgan Hill CA"
|
|
87
89
|
})
|
|
88
90
|
```
|
|
89
91
|
|
|
90
92
|
### Field appends
|
|
91
93
|
|
|
92
|
-
Geocodio allows you to append additional data points such as congressional districts, census codes, timezone, ACS survey results and [much more](https://www.geocod.io/docs/#fields).
|
|
94
|
+
Geocodio allows you to append additional data points such as congressional districts, census codes, timezone, ACS survey results, UK constituencies and wards, and [much more](https://www.geocod.io/docs/#fields).
|
|
93
95
|
|
|
94
96
|
To request additional fields, simply supply them as a list:
|
|
95
97
|
|
|
@@ -103,6 +105,13 @@ response = client.geocode(
|
|
|
103
105
|
)
|
|
104
106
|
|
|
105
107
|
response = client.reverse("38.9002898,-76.9990361", fields=["census2010"])
|
|
108
|
+
|
|
109
|
+
# United Kingdom addresses support UK-specific appends such as Westminster and
|
|
110
|
+
# devolved parliament constituencies, and local authority wards
|
|
111
|
+
response = client.geocode(
|
|
112
|
+
"10 Downing St, London, United Kingdom",
|
|
113
|
+
fields=["uk-westminster", "uk-local"]
|
|
114
|
+
)
|
|
106
115
|
```
|
|
107
116
|
|
|
108
117
|
### Address components
|
|
@@ -128,6 +137,12 @@ response = client.geocode([
|
|
|
128
137
|
"city": "Toronto",
|
|
129
138
|
"state": "ON",
|
|
130
139
|
"country": "Canada"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"street": "10 Downing St",
|
|
143
|
+
"city": "London",
|
|
144
|
+
"postal_code": "SW1A 2AA",
|
|
145
|
+
"country": "United Kingdom"
|
|
131
146
|
}
|
|
132
147
|
])
|
|
133
148
|
```
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "geocodio-library-python"
|
|
7
|
-
version = "
|
|
7
|
+
version = "1.3.0"
|
|
8
8
|
description = "A Python client for the Geocodio API"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -48,6 +48,9 @@ Issues = "https://github.com/geocodio/geocodio-library-python/issues"
|
|
|
48
48
|
[tool.hatch.build.targets.wheel]
|
|
49
49
|
packages = ["src/geocodio"]
|
|
50
50
|
|
|
51
|
+
[tool.isort]
|
|
52
|
+
profile = "black"
|
|
53
|
+
|
|
51
54
|
[tool.pytest.ini_options]
|
|
52
55
|
testpaths = ["tests"]
|
|
53
56
|
python_files = "test_*.py"
|
|
@@ -57,7 +57,7 @@ def main():
|
|
|
57
57
|
logger.info("Creating a new list...")
|
|
58
58
|
file_content = "Zip\n20003\n20001"
|
|
59
59
|
# --- Capture request details ---
|
|
60
|
-
logger.info("REQUEST: POST /
|
|
60
|
+
logger.info("REQUEST: POST /v2/lists")
|
|
61
61
|
logger.info(f"Request params: {{'api_key': '***', 'direction': 'forward', 'format': '{{A}}'}}")
|
|
62
62
|
logger.info(f"Request files: {{'file': ('smoke_test_list.csv', {repr(file_content)})}}")
|
|
63
63
|
new_list_response = client.create_list(
|
|
@@ -66,7 +66,7 @@ def main():
|
|
|
66
66
|
format_="{{A}}"
|
|
67
67
|
)
|
|
68
68
|
# --- Capture response details ---
|
|
69
|
-
logger.info("RESPONSE: POST /
|
|
69
|
+
logger.info("RESPONSE: POST /v2/lists")
|
|
70
70
|
print_headers_and_body("Response", {
|
|
71
71
|
"id": new_list_response.id,
|
|
72
72
|
"file": new_list_response.file,
|