Skip to main content

Getting started

routing-earth-utils version

Read this online at docs.routing-earth.com.

routing-earth-utils (CLI is re) is the client software to initialize a local Valhalla graph extract and to consume daily/weekly/monthly graph delta updates with up-to-date OSM road data, no older than 12 hours.

Requirements

  • Python ≥ 3.12 (binary wheels for Linux x86_64/aarch64, macOS arm64, Windows amd64)
  • A paid routing-earth.com API key with an entitlement for your scope & cadence (get one at routing.earth)
  • Disk: syncing briefly holds two copies of the extract plus the downloaded bundles (~2× the extract size)

Install

=== "uv"

```sh
uv tool install routing-earth-utils
# or, inside a project:
uv add routing-earth-utils
```

=== "pip"

```sh
pip install routing-earth-utils
```

This installs the re command.

Authentication

The CLI reads your API key from the environment (or pass --api-key):

export RE_API_KEY="re_..."

The key is only ever sent as a Bearer header to the routing.earth API. 401 means the key is invalid, 403 means it has no entitlement for the requested scope & cadence.

re init - Seed the extract

Pick a scope (planet or a region id, e.g. germany) and a cadence (daily, weekly or monthly) matching your plan, then:

re init --tar-extract tiles.tar --scope germany --cadence daily

This downloads the current full snapshot, verifies its signature, and writes a ready-to-serve extract:

initialized tiles.tar at dataset_id 20260718 (germany/daily), osm data 2026-07-18T02:00:00Z

osm data is the OSM timestamp of the graph you now have installed (see Which OSM timestamp?).

Or start from a web download

A graph downloaded from the routing-earth.com dashboard is the same extract re init writes, except that it doesn't know your plan's cadence yet. Decompress it and name the cadence on the first sync:

zstd -d germany.tar.zst -o tiles.tar
re sync --tar-extract tiles.tar --cadence daily

The cadence is recorded the first time a sync updates the extract, and later syncs don't need it. If the first sync finds the extract already current, nothing is written, so pass --cadence until the first update lands.

Serve it

Point Valhalla at the tar in your valhalla.json:

{
  "mjolnir": {
    "tile_extract": "/path/to/tiles.tar"
  }
}

re sync - Keep it current

re sync --tar-extract tiles.tar

This downloads the diff bundle chain, applies it tile by tile, and atomically swaps the new extract into place. If your extract is too far behind, we might decide to pull a fresh full graph.

synced 20260718 -> 20260719 (diff-chain, 1 bundle(s), 46.0 MiB), osm data 2026-07-19T02:00:00Z

As with init, osm data describes what is installed after the sync.

Every step along the chain is verified via our bundle signatures (Ed25519), and a per-tile checksum check adds additional security. Any failure aborts the sync and leaves your current extract untouched.

Operationally, run re sync on a scheduler with e.g. a 15 mins cadence:

# e.g. crontab, for a daily cadence
*/15 * * * * RE_API_KEY=re_... re sync --tar-extract /srv/valhalla/tiles.tar

Exits with code:

  • 0 on success (including "already current")
  • 1 on any failure

!!! note "Picking up the new extract" The swap is an atomic rename. A running Valhalla keeps serving the old extract from its memory map until it reopens the file — restart or reload the service after a successful sync to serve the new data.

re status - Check local graph's update status

re status --tar-extract tiles.tar
{"tar_extract": "tiles.tar", "dataset_id": 1793425889, "scope": "germany", "cadence": "daily", "verdict": "diff-chain", "latest_dataset_id": 1795439150, "osm_data_timestamp": "2026-07-18T02:00:00Z", "latest_osm_data_timestamp": "2026-07-19T03:00:00Z", "download_bytes": 234213904}

The fields come in pairs:

installed (your extract) latest (what re sync would bring)
dataset dataset_id latest_dataset_id
OSM timestamp osm_data_timestamp latest_osm_data_timestamp

download_bytes is what re sync would download right now: the summed diff bundles, the full snapshot on a full verdict, 0 when current. Check it before syncing, e.g. to wait for wifi before a large update.

Add --offline to simply print the local graph status without requesting our API (verdict, latest_dataset_id, latest_osm_data_timestamp and download_bytes are then null; the installed fields are still filled in).

Exits with code:

  • 0 on verdict = current
  • 1 on error
  • 2 on verdict = diff-chain or full, i.e. graph needs an update

Using the Python API

Everything the CLI does is available as a library, starting with routing_earth_utils.client:

from pathlib import Path
from routing_earth_utils.client import init, sync, tar_status

extract = Path("tiles.tar")
if not extract.exists():
    init(extract, scope="germany", cadence="daily")
result = sync(extract)
print(result.verdict, result.to_dataset_id)

Troubleshooting

Symptom Cause / fix
resolver: HTTP 401 (invalid API key) $RE_API_KEY unset or wrong — check the export and your account.
resolver: HTTP 403 (no entitlement for this scope/cadence) Your plan doesn't cover this scope × cadence — re-check init arguments against your subscription.
not an initialized extract The tar wasn't created by re init (or is some other file). Seed it with init first.
already exists — use sync init never overwrites; advance an existing extract with sync, or remove it to reseed.
Signature / verification errors Fail-closed by design: the download was rejected and your extract is untouched. The <extract>.work dir is kept for diagnosis (safe to delete; the next run starts clean). Retry; if it persists, contact support.
Sync fails with a disk-space error Copy-on-sync needs roughly the extract's size in free space next to it.

Increase verbosity with -v (progress) or -vv (debug); diagnostics go to stderr.

Metadata

Release files for routing-earth-utils 0.7.1

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

Built distributions (wheels)

Table of built distributions (wheels) for routing-earth-utils 0.7.1
File Actions
routing_earth_utils-0.7.1-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details for routing_earth_utils-0.7.1-cp312-abi3-win_amd64.whl
routing_earth_utils-0.7.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for routing_earth_utils-0.7.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
routing_earth_utils-0.7.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for routing_earth_utils-0.7.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
routing_earth_utils-0.7.1-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for routing_earth_utils-0.7.1-cp312-abi3-macosx_11_0_arm64.whl

Total release size: 845.1 kB

Release files / routing_earth_utils-0.7.1-cp312-abi3-win_amd64.whl

Download URL routing_earth_utils-0.7.1-cp312-abi3-win_amd64.whl
Size 349.7 kB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
71dfe16cd34f579abc86c180dc5ad64a0ffab71ad07bbaa20691a0702d1ec085
BLAKE2b-256 checksum
How to use checksums
9062a10165380f5a5f3ba1e039ae5dee8d556659d6ae1d910bf0cb7ec189aa01
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 Nov 30, 2026.

Transparency log

Release files / routing_earth_utils-0.7.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL routing_earth_utils-0.7.1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 199.9 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
51a41544e956eacdb5055c30858295cc443dc421357abc3f7fb6d3740d27dbcf
BLAKE2b-256 checksum
How to use checksums
694cc9c1675f9815c9f00b359efbdd60692eac14ea714cbfa93b68e4c32cae37
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 Nov 30, 2026.

Transparency log

Release files / routing_earth_utils-0.7.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL routing_earth_utils-0.7.1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 186.4 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
bd92004224fc766b01aad9886712f50816e0b94753e0fc159389c0b518972650
BLAKE2b-256 checksum
How to use checksums
84db3c798079ce203628fbb504e3af63d41a7e4dce3b598ea287bdbeebd601d6
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 Nov 30, 2026.

Transparency log

Release files / routing_earth_utils-0.7.1-cp312-abi3-macosx_11_0_arm64.whl

Download URL routing_earth_utils-0.7.1-cp312-abi3-macosx_11_0_arm64.whl
Size 109.1 kB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bdf2fbf54ffb9102515f648b2af1207dc1da962f62c8a331d7f407b96932978a
BLAKE2b-256 checksum
How to use checksums
90f0a8f164ca97d70d37686bef4a21740ff3cea37ed4c43b1046f737ffd9c08c
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 Nov 30, 2026.

Transparency log

Security for routing-earth-utils 0.7.1

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 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for routing_earth_utils-0.7.1-cp312-abi3-win_amd64.whl

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 Nov 30, 2026.

Transparency log

A 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.

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