wkls: Well-Known Locations
wkls gives you administrative boundaries — countries, regions, counties, and cities — in one line of Python.
import wkls
wkls.us.ca.sanfrancisco.wkt()
# "MULTIPOLYGON (((-122.5279985 37.8155806...)))"
- Chainable attribute access to countries, states, counties, and cities
- Precise geometries from Overture Maps Foundation — no bounding boxes, no shapefiles
- Currently,
wklsoutputs boundaries in WKT or WKB - Support for GeoJSON, HexWKB, and SVG planned
- Zero configuration — no API keys, no downloads, no setup
- Automatically uses the latest Overture Maps release
Installation
pip install wkls
Usage
Countries, regions, counties, and cities
Chain up to 3 levels: country → region → county or city.
import wkls
wkls.us.wkt() # United States
wkls.us.ca.wkt() # California
wkls.us.ca.sanfrancisco.wkt() # San Francisco
Countries and dependencies use ISO 3166-1 alpha-2 codes.
Regions use the code suffix from Overture (e.g. ca for US-CA).
Counties and cities match by name against the Overture dataset.
Geometry formats
wkls.de.wkt() # Well-Known Text string
wkls.de.wkb() # Well-Known Binary bytes
Exploring the dataset
wkls.countries() # all countries
wkls.dependencies() # all dependencies
wkls.us.regions() # regions in the US
wkls.us.ca.counties() # counties in California
wkls.us.ca.cities() # cities in California
wkls.fk.cities() # countries without regions work too
Wildcard search
Use % for pattern matching when you're not sure of the exact name:
wkls.us.ca["%francis%"] # matches "San Francisco"
Pinning an Overture version
wkls auto-detects the latest Overture Maps release. To pin a specific version:
wkls.configure(overture_version="2025-12-17.0")
wkls.overture_version() # current version
wkls.overture_releases() # available versions
Or set the WKLS_OVERTURE_VERSION environment variable:
export WKLS_OVERTURE_VERSION=2025-12-17.0
Priority: configure() > environment variable > auto-detect.
Bracket access
Some names collide with Python keywords or DataFrame methods. Use bracket syntax when attribute access doesn't work:
wkls["us"]["ne"].wkt() # Nebraska (wkls.us.ne would call DataFrame.ne)
wkls["at"]["1"].regions() # Austria's region "1"
You can mix attribute and bracket access freely.
How it works
wkls resolves locations in two stages:
-
Metadata resolution — your chained attributes are matched against a bundled metadata table (country by ISO code, region by code suffix, county or city by name). No geometry is loaded at this stage.
-
Geometry fetch — when you call
.wkt()or.wkb(), the geometry is fetched from Overture Maps GeoParquet on S3 via Apache SedonaDB.
Contributing
We welcome contributions! Please see our Contributing Guide for details on how to get started, development setup, and submission guidelines.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
wkls includes, references, and leverages data from the "Divisions" theme of Overture, from Overture Maps Foundation:
- © OpenStreetMap contributors. Available under the Open Database License.
- geoBoundaries. Available under CC BY 4.0.
- Esri Community Maps contributors. Available under CC BY 4.0.
- Land Information New Zealand (LINZ). Available under CC BY 4.0.
Acknowledgments
- Overture Maps Foundation for providing high-quality, open geospatial data.
- AWS Open Data Registry for hosting the dataset.
- Apache SedonaDB for the high-performance, single-node spatial query and analytics engine.
Metadata
Release files for wkls 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| wkls-1.0.0.tar.gz | 16.4 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wkls-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.8 MB
Release files / wkls-1.0.0.tar.gz
| Download URL | wkls-1.0.0.tar.gz |
|---|---|
| Size | 16.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36fceb26513c7ec2238bd28b4e209116f9d5e70d219ef38a4cea1d59ee4691ca
|
|
BLAKE2b-256 checksum How to use checksums |
5d681342756e58fd0c2a09d4b7412de49d15307e57409745209c20b302984fac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 19, 2026.
Transparency logRelease files / wkls-1.0.0-py3-none-any.whl
| Download URL | wkls-1.0.0-py3-none-any.whl |
|---|---|
| Size | 16.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
233d03d38b1b08b0271480f5a51dc970641771ff90fd0c576695af1edb18c475
|
|
BLAKE2b-256 checksum How to use checksums |
ac32eb2d778a2800af8bd2dcdba2ed91ea4abc28598488f6cbad94948646bd76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 19, 2026.
Transparency logSecurity for wkls 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for wkls-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.