Skip to main content

Velarium IR to .pyi stub generation (velotype backend)

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

velotype

Role in Velarium: IR → .pyi — render Velarium (ModelSpec) IR as minimal stub text, and expose the velotype CLI for quick IR export and stub generation from live classes.

PyPI velotype
Depends on velarium (required)
CLI velotype ir, velotype stub (also python -m velotype)

The IR types and builders live in velarium. velotype re-exports most public IR symbols (same layout as velarium) for convenience; prefer from velarium import … in new code when you only need IR.

Install

pip install velotype

From the monorepo root:

uv sync --group dev
# or
pip install -e packages/velarium -e "packages/velotype[dev]"

CLI

velotype ir myapp.models:User
velotype ir myapp.models:User -o user.ir.json
velotype stub myapp.models:User -o user.pyi

Library

from velarium import modelspec_from_dataclass, dumps_model_spec
from velotype import generate_pyi

spec = modelspec_from_dataclass(MyModel)
print(generate_pyi(spec))

Version

__version__ is in velotype/__init__.py (Hatch dynamic metadata in this package’s pyproject.toml).

See also

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

velotype-0.1.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

velotype-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file velotype-0.1.0.tar.gz.

File metadata

  • Download URL: velotype-0.1.0.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for velotype-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7205984e06788ebb72c9e0f9a8d46f77c1a67291e9b45e1eb8141b416a747e0b
MD5 78b86816f3a2b0e3891656ab8cd67640
BLAKE2b-256 dac531b8744151e69c1fb1fc24a893f11615c1dd14fd4558f638abf0a2577324

See more details on using hashes here.

File details

Details for the file velotype-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: velotype-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for velotype-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 114d67831e4b8e5fb53765482537f39d32e4dd4c04b0a74009a426c0f7a5ecd2
MD5 b8a0938c43f477160bfd28a88fd0e884
BLAKE2b-256 ead5097fbab8cdb018e509a908bb5c313b1dc6898392efd894c124cb165a6d27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page