Skip to main content

Thereabouts for Python

Offline geographic context through the shared Thereabouts Rust core: coordinates, H3 cells, town names, postal codes, airports, UN/LOCODEs, phone numbers, IP addresses and vehicle plates. Python 3.11+; abi3 wheels; NumPy is the only mandatory dependency. The code is MIT licensed.

pip install thereabouts            # add the MCP server with: pip install "thereabouts[mcp]"
thereabouts data install core postal airports

No data is bundled. data install reads the project's GitHub releases by default (set THEREABOUTS_RELEASE_TOKEN or GITHUB_TOKEN while the repository is private), or an explicit local release directory or URL with --from; data install dataset restores the Parquet dataset. Opening and querying never download data. The families are core, postal, airports, locode, phone, ip and plates; core is the largest (about 460 MB to download).

from thereabouts import Geocoder

with Geocoder(data_dir="./store") as geo:
    result = geo.reverse(lat=48.8566, lon=2.3522)
    print(result.to_dict())
    print(geo.from_h3("881fb46625fffff"))
    print(geo.geocode("Paris", country="FR", limit=5))
    print(geo.postal("75001", country="FR"))
    print(geo.airport("CDG", scheme="iata"))
    print(geo.locode("FRPAR"))
    print(geo.phone("+33 1 2345 6789"))
    print(geo.ip("8.8.8.8"))
    print(geo.plate("AB-123-CD", country="FR"))

Install the corresponding family before a forward lookup. Core also provides city-name lookup: finds towns and cities by name; street addresses are not supported. Country and subdivision filters are hard filters. prefer="population" explicitly selects the population ranking.

reverse_many accepts mappings with lat/lon or objects with those attributes, yielding results in order. It rejects bare coordinate pairs. reverse_columns(lat, lon) accepts NumPy arrays and returns dictionary-encoded string columns, fixed-width numeric arrays and validity masks. Candidates are omitted from columnar output; reverse never has candidates.

Geocoder("/path/to/pack") opens one pack. Geocoder(packs={"core": "...", "postal": "..."}) selects explicit packs; verify=True requests full verification. Geocoder() discovers data_dir, THEREABOUTS_DATA, then the platform user-data directory. The module-level reverse(lat=, lon=) lazily opens this default store. close() is idempotent.

Result objects are frozen and remain usable after close. Fields are status, kind, match, point, cell, city, state, country, timezone, distance_band, rank_basis and candidates, plus optional evidence. Ambiguity retains common flat fields and ranked candidates. Invalid query values return invalid_input; data/discovery/lifecycle failures raise exceptions with stable code strings: DataNotInstalledError, IncompatibleDataError, CorruptPackError, ClosedGeocoderError, PackNotFoundError, WriterError and WriterInputError, all derived from GeocoderError. Missing data names the exact install command.

The thereabouts console provides reverse, h3, geocode, postal, airport, locode, phone, ip, plate, data management, info and optional MCP. Install the mcp extra to run thereabouts mcp. Table, JSON, NDJSON and CSV output share Rust logic with Node. Guides in the repository: Python client, installing data, command line and MCP server.

The MCP server also describes the dataset. Its read-only describe tool and the thereabouts://dictionary resources (JSON, and /markdown) serve the data dictionary of the installed core pack, or the copy packaged with this client. The repository's skills/thereabouts teaches agents to use both.

Metadata

Release files for thereabouts 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thereabouts 0.1.0
File Size Uploaded
thereabouts-0.1.0.tar.gz 273.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for thereabouts 0.1.0
File
thereabouts-0.1.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
thereabouts-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details
thereabouts-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details
thereabouts-0.1.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
thereabouts-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 35.8 MB

Release files / thereabouts-0.1.0.tar.gz

Download URL thereabouts-0.1.0.tar.gz
Size 273.7 kB
Tags Source
SHA-256 checksum
How to use checksums
41658985190848c4278cb1a1e0a2534cf33250800354417d10fd69d68217c37d
BLAKE2b-256 checksum
How to use checksums
684a408526daad2b9ca1f5337f2e25512525d2f993acb07577a2c0348a4f8c27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 11, 2026.

Transparency log

Release files / thereabouts-0.1.0-cp311-abi3-win_amd64.whl

Download URL thereabouts-0.1.0-cp311-abi3-win_amd64.whl
Size 7.2 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4ce15418e26c18a3223e280c5f611032de33863ba35e94060d36757f7a15cb35
BLAKE2b-256 checksum
How to use checksums
824a715a5aff7aed42ebee238573ec5377bfc800802c2899a8b889c726db3683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 11, 2026.

Transparency log

Release files / thereabouts-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL thereabouts-0.1.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 7.6 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
85d6922c50a44110b0134a33fc0a5b203e4537564a1d620402e726fcceeb5627
BLAKE2b-256 checksum
How to use checksums
675e56b1fc16c1153cea7f750d8dbb8be650f325b519594d57db8c58fbf3ae5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 11, 2026.

Transparency log

Release files / thereabouts-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL thereabouts-0.1.0-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 7.1 MB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
fcaebc50ca219ee49dc9bdeca232dc3a6adc13632631e36c93ae021af28554be
BLAKE2b-256 checksum
How to use checksums
19aa7a27f30732d40bfbd37d7856ed113a3d22c731d73c7702d8123a70896e5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 11, 2026.

Transparency log

Release files / thereabouts-0.1.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL thereabouts-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
Size 6.5 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
46f84125686aa7e7a6f96abb7da808fa6b960ff2a406f663e1808fac55a50d0e
BLAKE2b-256 checksum
How to use checksums
93c3aa5b34f1732741189ab0c92a1184ab06fdb7695627b597d06afd1aabf592
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 11, 2026.

Transparency log

Release files / thereabouts-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL thereabouts-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 7.1 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
07642ea27c943f71a00c7726a25249143d9ac48287c199af47dd95d3ef634328
BLAKE2b-256 checksum
How to use checksums
7bb7a61ca5b7300a1a0f9b2754ed38e0f504fdd97f7e2c90a5dae7bb39f69aeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page