wkls is an open-source library maintained by Wherobots that provides easy, programmatic access to global administrative boundaries—countries, regions, cities, and more—using data from the Overture Maps Foundation. It comes pre-installed in WherobotsDB and is also available via pip.
For the latest updates, see the wkls GitHub repository.
Installation
If you’re not using Wherobots Cloud, installwkls via pip:
Quick start
Geometry formats
Every location exposes three output formats:Hierarchy navigation
Use chainable dot access with ISO codes or English names:Discovery
Explore what’s available at any level of the hierarchy:
All discovery methods are scoped to the current chain position.
Countries without regions
Some countries/dependencies may not have regions. For those, call.counties() or .cities() directly:
Collection protocol
Location collections support standard Python protocols:Arrow escape hatch
For advanced use cases, export the full Overture Maps record as a PyArrow table:Disambiguation
When multiple locations share a name, narrow with the parent hierarchy:Version management
wkls uses Overture Maps releases as its data source. Control which version you use:
WKLS_OVERTURE_VERSION environment variable:
Troubleshooting
The following are common issues you may encounter when usingwkls, along with their causes and solutions:
SedonaError: Can't infer Parquet schema for zero objects
SedonaError: Can't infer Parquet schema for zero objects
Cause: An outdated
wkls install in a local environment. pip install wkls can resolve to an older or cached version that points at an Overture Maps data path that no longer returns records. This does not apply in Wherobots Cloud, where wkls comes pre-installed in WherobotsDB.Solution:- Upgrade to the latest version:
pip install --upgrade wkls. - Confirm the installed version with
pip show wkls, then restart your Python session or notebook kernel so the new version is loaded. - If the error persists, reinstall without the pip cache:
pip install --upgrade --no-cache-dir wkls.
NameError: name 'wkls' is not defined
NameError: name 'wkls' is not defined
Cause:
wkls is available in your environment, but it has not been imported into the current session.Solution:- Add
import wklsto your notebook or script before calling anywklsmethods.

