Python toolkit for the General Modeling Network Specification (GMNS). Fast I/O at regional scale (parquet/duckdb/zip/URL), foreign-key validation with out-of-sync awareness, geographic + network-aware scoping, data-quality checks, network editing with atomic rollback, and a CLI + notebook + programmatic API.
Project description
GMNSpy
Python toolkit for the General Modeling Network Specification (GMNS) — Zephyr Foundation's open standard for routable transportation network data.
Status: v1.0 in development on refactor/v1.0. See docs/PRD.md for the product requirements document.
What it provides
- Read/write GMNS networks from CSV, Parquet (partitioned), DuckDB, zipped CSV, or remote URLs (with credentials).
- Validation — schema, structural, foreign-key, sync-state (out-of-sync awareness on write), and configurable data-quality rules.
- Network-aware scoping — bbox, polygon, BFS / shortest-path subgraph, network-distance buffer, spatial buffer from any link/point/node.
- Editing (
gmnspy[clean]) — simplify geometry, merge close nodes, snap to reference, etc., with atomic rollback + audit log. - Self-hostable API server (
gmnspy[server]) — FastAPI + auto-OpenAPI for spinning up your own GMNS data service. - AI accessibility (
gmnspy[mcp]) — MCP server entry point; Skills in the monoreposkills/directory. - CLI, notebook, and programmatic API — same operations, three surfaces.
Install
Pick the tool you already use — these are equivalent:
# uv (recommended — fastest, handles workspace projects + lockfiles)
uv add gmnspy
# uv pip (drop-in pip replacement, no project file needed)
uv pip install gmnspy
# pip (classic)
pip install gmnspy
# pipx (CLI-only, isolated env; gives you the `gmnspy` command without
# polluting your project env)
pipx install gmnspy
datagrove comes along automatically — you don't install both.
Optional extras
uv add 'gmnspy[osm]' # build a GMNS network from OpenStreetMap (requests + pyyaml)
uv add 'gmnspy[clean]' # network editing + cleanup (shapely + igraph + pyproj)
uv add 'gmnspy[server]' # self-hostable HTTP server (FastAPI + uvicorn)
uv add 'gmnspy[mcp]' # MCP server for Claude Desktop / Code
uv add 'gmnspy[notebook]' # scope-builder Jupyter widget (ipywidgets)
uv add 'gmnspy[all]' # everything above
Combine extras with commas: uv add 'gmnspy[clean,server,mcp]'.
Note: the basic
_repr_html_forNetwork/ValidationReport/EditResultworks without[notebook]— that extra only adds the interactive scope-builder widget.
Quickstart
import gmnspy
from gmnspy.fixtures import leavenworth # bundled example network
net = gmnspy.read(leavenworth.csv_dir()) # auto-detects format
report = gmnspy.validate(net) # schema + FK + data-quality
print(report) # rich console
# report.to_html("report.html") # writes interactive single-file HTML
# Network-aware scope: BFS subgraph + half-mile network buffer
# sub = net.scope.from_nodes([1, 2, 3], path_between=True).buffer_network("0.5mi")
# sub.write("subset.parquet")
Repo
Developed in the GMNSpy monorepo under packages/gmnspy/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gmnspy-1.0.0b1.tar.gz.
File metadata
- Download URL: gmnspy-1.0.0b1.tar.gz
- Upload date:
- Size: 202.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
febeb1b8b3d5b3d9cfa7c9dca9705c0e67b063d736e978889e4bd84c0b2dc778
|
|
| MD5 |
502e6580f9c8eea7f31e6376a5fff315
|
|
| BLAKE2b-256 |
20aedcd9ef9b9958fe67385e3c5f9769199af2ad9a32786b6f54186994830c4f
|
Provenance
The following attestation bundles were made for gmnspy-1.0.0b1.tar.gz:
Publisher:
publish-gmnspy.yml on e-lo/GMNSpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gmnspy-1.0.0b1.tar.gz -
Subject digest:
febeb1b8b3d5b3d9cfa7c9dca9705c0e67b063d736e978889e4bd84c0b2dc778 - Sigstore transparency entry: 2012783483
- Sigstore integration time:
-
Permalink:
e-lo/GMNSpy@3db68f566eb4c97370dabf2b262b12daf7b6cb1b -
Branch / Tag:
refs/tags/gmnspy-v1.0.0-beta.1 - Owner: https://github.com/e-lo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-gmnspy.yml@3db68f566eb4c97370dabf2b262b12daf7b6cb1b -
Trigger Event:
push
-
Statement type:
File details
Details for the file gmnspy-1.0.0b1-py3-none-any.whl.
File metadata
- Download URL: gmnspy-1.0.0b1-py3-none-any.whl
- Upload date:
- Size: 290.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1455d36e3efd1c62ed22cd8f3a05ff2ca4e362802afea9a04dd7c0c6dc03393e
|
|
| MD5 |
5c08741797d7f020d456de2432d7e529
|
|
| BLAKE2b-256 |
52e68b42d81aa75e348b640011d0f971280f8b807b945a8a5030a9e46f00598c
|
Provenance
The following attestation bundles were made for gmnspy-1.0.0b1-py3-none-any.whl:
Publisher:
publish-gmnspy.yml on e-lo/GMNSpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gmnspy-1.0.0b1-py3-none-any.whl -
Subject digest:
1455d36e3efd1c62ed22cd8f3a05ff2ca4e362802afea9a04dd7c0c6dc03393e - Sigstore transparency entry: 2012783612
- Sigstore integration time:
-
Permalink:
e-lo/GMNSpy@3db68f566eb4c97370dabf2b262b12daf7b6cb1b -
Branch / Tag:
refs/tags/gmnspy-v1.0.0-beta.1 - Owner: https://github.com/e-lo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-gmnspy.yml@3db68f566eb4c97370dabf2b262b12daf7b6cb1b -
Trigger Event:
push
-
Statement type: