Define urirun connector routes declaratively — a spec dict (scheme/target/routes) becomes typed URI bindings, no Python handler code. Pure stdlib, no urirun dependency.
Project description
urirun-declarative
AI Cost Tracking
- 🤖 LLM usage: $0.0132 (2 commits)
- 👤 Human dev: ~$538 (5.4h @ $100/h, 30min dedup)
Generated on 2026-07-05 using openrouter/qwen/qwen3-coder-next
Define urirun connector routes declaratively — a spec dict (scheme, target, routes with
method/path/schema) becomes typed URI bindings with no Python handler code. The urirun fetch
adapter then resolves each route. Extracted from urirun.connectors.declarative as a standalone,
dependency-free package.
Pure stdlib (pathlib, typing) — no urirun dependency — so a declarative connector
(e.g. urirun-connector-ksef) can depend on just this, not the whole backend.
Why it's its own package
extraction_audit.py reports it a clean leaf (zero urirun imports, stdlib only). It is a distinct,
reusable capability — spec → bindings — consumed by declarative connectors. Same lift case as
urirun-cdp / urirun-uinput / urirun-openapi-import.
Install
pip install -e . # editable, from this repo
Use
from urirun_declarative import declarative
spec = declarative.load_spec("ksef.routes.yaml")
bindings = declarative.bindings_from_spec(spec)
Back-compat
The old import path still works via a re-export shim in the urirun package:
from urirun.connectors import declarative # → urirun_declarative.declarative (sys.modules shim)
A connector that imports this at module top (e.g. ksef) declares urirun-declarative in its own
dependencies, so it is installed wherever that connector runs.
Tests
PYTHONPATH=../urirun/adapters/python python -m pytest tests/ -q
License
Licensed under Apache-2.0.
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 urirun_declarative-0.1.1.tar.gz.
File metadata
- Download URL: urirun_declarative-0.1.1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e90ae176ba92fe271f0ef3dc574ecd06be8f44e466e4cd71addcfa084d7813a
|
|
| MD5 |
2b79ef2ac9887b02e18db537fbd3ce1a
|
|
| BLAKE2b-256 |
f275e8756b0bdd2068941c0d9e8cedb3af8079488a0cb5215547848a3e7dba32
|
File details
Details for the file urirun_declarative-0.1.1-py3-none-any.whl.
File metadata
- Download URL: urirun_declarative-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.4 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 |
6059bd28c274cc6707655ed7c0895fed6a81bcb9b4a63272071bedcc8e8a79a1
|
|
| MD5 |
abc1a5a93ff521d219b59349d19d87d6
|
|
| BLAKE2b-256 |
d1a26e910efb673192d40a2b476b2e791d1a3ffef6862f9ae228004e216b6d77
|