IR to .pyi stub generation (Velarium stubber backend)
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
stubber
Role in Velarium: IR → .pyi — render Velarium (ModelSpec) IR as minimal stub text, and expose the stubber CLI for quick IR export and stub generation from live classes.
| PyPI | stubber |
| Depends on | velarium (required) |
| CLI | stubber ir, stubber stub (also python -m stubber) |
The IR types and builders live in velarium. stubber re-exports most public IR symbols from stubber for backward compatibility; prefer from velarium import … in new code when you only need IR.
Install
pip install stubber
From the monorepo root:
uv sync --group dev
# or
pip install -e packages/velarium -e "packages/stubber[dev]"
CLI
stubber ir myapp.models:User
stubber ir myapp.models:User -o user.ir.json
stubber stub myapp.models:User -o user.pyi
Library
from velarium import modelspec_from_dataclass, dumps_model_spec
from stubber import generate_pyi
spec = modelspec_from_dataclass(MyModel)
print(generate_pyi(spec))
Version
__version__ is in stubber/__init__.py (Hatch dynamic metadata in this package’s pyproject.toml).
See also
- docs/modelspec-ir.md — IR schema
- docs/valarium.md — ecosystem and backends
- Documentation index
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 stubber-0.1.0.tar.gz.
File metadata
- Download URL: stubber-0.1.0.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e66f4666ba31f244f6adb14822085f36659648f980e5774404fc96c15d82e3b
|
|
| MD5 |
9219ce730895ad5ad9b16a04c2ec2f64
|
|
| BLAKE2b-256 |
0bf772e23afc630cb95557a03ac09b7722522c16a05c68048a321e10ac2fccfa
|
File details
Details for the file stubber-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stubber-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
626cbce498cf7182221d367d599529863b2acb44d0310bb2bbcb23617b2800d0
|
|
| MD5 |
34cf42b0db5ee9b5282630e149f0fc02
|
|
| BLAKE2b-256 |
b982c722dfff6d119747a7f0f159eb863ac39ab6b759ee5d5c4330774b20015a
|