urirun-openapi-import
AI Cost Tracking
- 🤖 LLM usage: $0.0001 (1 commits)
- 👤 Human dev: ~$523 (5.2h @ $100/h, 30min dedup)
Generated on 2026-07-05 using openrouter/qwen/qwen3-coder-next
Import an OpenAPI / Swagger spec as urirun URI bindings — each API operation becomes a typed
http-service route addressable by URI. Extracted from urirun.connectors.openapi_import as a
standalone, dependency-free package.
Pure stdlib (urllib, pathlib) — no urirun dependency — so it can be installed wherever
the add_openapi capability is needed without pulling in the backend.
Why it's its own package
extraction_audit.py reports it a clean leaf (zero urirun imports, stdlib only). It is a distinct,
self-contained capability — turning a spec into bindings — that only node/mesh.py consumes, and
only lazily (the urirun … add_openapi CLI command). The textbook lift case, like urirun-cdp /
urirun-uinput.
Install
pip install -e . # editable, from this repo
Use
from urirun_openapi_import import openapi_import
spec = openapi_import.load_spec("https://api.example.com/openapi.json")
bindings = openapi_import.import_openapi(spec, scheme="api", target="example")
Back-compat
The old import path still works via a re-export shim in the urirun package:
from urirun.connectors import openapi_import # → urirun_openapi_import.openapi_import (sys.modules shim)
node/mesh.py loads it lazily inside the add_openapi CLI command, so the broad import graph is
unaffected when this package isn't installed; only that command needs it.
Tests
PYTHONPATH=../urirun/adapters/python python -m pytest tests/ -q
The capability's own tests live here (tests/test_openapi_import.py).
License
Licensed under Apache-2.0.
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 urirun_openapi_import-0.1.1.tar.gz.
File metadata
- Download URL: urirun_openapi_import-0.1.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c402b54e8bf5fd24d80a5070eedf121bd8980bbb924070de033a5e128d2530f
|
|
| MD5 |
2298fc3431e841fb0a857910edbefb80
|
|
| BLAKE2b-256 |
23ebce4fea565275f87293f17a42cab82d745f10ca83bfd3e2b4e858501062b0
|
File details
Details for the file urirun_openapi_import-0.1.1-py3-none-any.whl.
File metadata
- Download URL: urirun_openapi_import-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2429d1b1f42ec126c17843780a545ed51168ee8084d682dccdca4e0b2b8dea84
|
|
| MD5 |
652deb0f81bb14cb9dbd3794dfba9e17
|
|
| BLAKE2b-256 |
f34fbf9094938c08cce885da07273241d0eb659a8d5a29aaf59b954a848fb511
|