Skip to main content

routemap-engine

Hostname-first, physics-checked traceroute geolocation, in pure Python.

Feeding each traceroute hop's IP address to a geolocation database draws a path that crosses oceans it never crossed, because a backbone router's address is registered wherever its operator filed the prefix. This engine reads the router's own hostname first (CAIDA Hoiho's published naming rules, then a carrier site-code table built from each carrier's own router list), uses an IP database only as a fallback, and rejects any location the measured round trip could not have reached (about 100 km per millisecond of the fastest probe, plus 300 km of slack). Hops it cannot place are reported with the reason.

It powers the Route Map tab in FalconEye.

pip install routemap-engine
from routemap_engine import analyse_sync, OFFLINE, run_trace, TraceOptions

route = analyse_sync(open("trace.txt").read(), origin=(14.6, 121.0))
route.to_dict()                       # schema: routemap_engine/route.schema.json

analyse_sync(text, None, sources=OFFLINE)          # contacts nothing
result = run_trace("example.com", TraceOptions(on_line=print))   # system traceroute
  • Parsers: Windows tracert (with or without -d), Unix traceroute (with or without -n, ECMP continuation lines), mtr --report.
  • Sources are passed in (default_sources(...) or your own callables); each runs under a hard time budget and losing one never fails a trace.
  • Progressive placement: progressive.ProgressiveTrace places each hop as its line arrives and ends with exactly the result of a one-shot analysis.
  • No global configuration; a pluggable cache for Hoiho answers.

What is sent where

Source Sends To
PTR public hop addresses that have no name the system resolver
Hoiho public router hostnames api.hoiho.caida.org
IP database public hop addresses stat.ripe.net

Private, CGNAT and reserved addresses are never looked up. Each upstream has its own terms: CAIDA's Acceptable Use Agreement for publicly accessible datasets (cite "The CAIDA UCSD Hoiho" in publications), and the RIPEstat Service Terms and Conditions, whose Article 3.3 requires RIPE NCC's written permission for commercial use. Any source can be switched off.

Data

  • routemap_engine/data/cities.tsv: GeoNames cities15000, CC BY 4.0.
  • routemap_engine/data/site_codes.tsv: generated from each carrier's own published router list; see routemap_engine/data/README.md to add a carrier.

Licence

GNU Affero General Public License v3.0. See LICENSE.

Contributing

See CONTRIBUTING.md. Pull requests need the Contributor Licence Agreement, signed once with a comment, and may be declined.

Metadata

Release files for routemap-engine 0.2.2

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

Source distribution (sdist)

Source distribution for routemap-engine 0.2.2
File Size Uploaded
routemap_engine-0.2.2.tar.gz 676.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for routemap-engine 0.2.2
File Interpreter ABI Platform
routemap_engine-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / routemap_engine-0.2.2.tar.gz

Download URL routemap_engine-0.2.2.tar.gz
Size 676.5 kB
Tags Source
SHA-256 checksum
How to use checksums
324a629142acf8c4296486fdf5e1ec2c442cfb4c08073b6c8f12c143e0c84f97
BLAKE2b-256 checksum
How to use checksums
c28f351f7bb37638aa9ebba842d2e913310e73679015bb8864cda0e93d507a7f
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 4, 2026.

Transparency log

Release files / routemap_engine-0.2.2-py3-none-any.whl

Download URL routemap_engine-0.2.2-py3-none-any.whl
Size 666.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ffc3942717892b2792af471c8958ddb9a4eb2d1cba4d4f3c6a18232affc7a3d
BLAKE2b-256 checksum
How to use checksums
8d8218cfccb62c4ab61abdff1755151989e3ab163b23a7fef9b293422431f9bf
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 4, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.0

2 release files

This release

0.2.2 This release

2 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