Skip to main content

Runtime client for valbridge-generated validators with type-safe schema lookup

Project description

valbridge

Runtime client for valbridge-generated Python validators with type-safe schema lookup.

PyPI License


Installation

pip install valbridge
# or
uv add valbridge

Quick start

from valbridge import create_valbridge
from _valbridge import schemas

valbridge = create_valbridge(schemas)

# Full namespace:id lookup
user_validator = valbridge("user:Profile")

# Validate data (Pydantic under the hood)
user_validator.validate_python({"name": "Alice", "email": "alice@example.com"})

Default namespace

valbridge = create_valbridge(schemas, default_namespace="user")

# Shorthand for "user:Profile"
profile = valbridge("Profile")

# Full key for other namespaces
config = valbridge("settings:AppConfig")

Key behaviors

  • Runtime lookup -- only entries with a runtime validator appear in the schemas object
  • Type safety -- invalid keys raise clear errors pointing to valbridge generate
  • Pydantic integration -- generated validators are native Pydantic BaseModel classes

Related packages

Package Purpose
valbridge-core Core IR and JSON Schema parser
valbridge-pydantic Pydantic adapter for code generation
valbridge-cli CLI to generate validators
@vectorfyco/valbridge TypeScript equivalent

Learn more

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

valbridge-1.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

valbridge-1.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file valbridge-1.1.0.tar.gz.

File metadata

  • Download URL: valbridge-1.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for valbridge-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4606b8bb683a29dc38103b154559022efe5a9396bcf599b9bd2723db313e8140
MD5 b67cdb082013b252e4977493164885f5
BLAKE2b-256 e172e7a607b3c9719346fdc0323367f1a284ba6dee861667a813576cfddd8b9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for valbridge-1.1.0.tar.gz:

Publisher: release-please.yml on vectorfy-co/valbridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file valbridge-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: valbridge-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for valbridge-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e541afa1b6098af56a22377ba79cb2c4e22e2b26fd9cf6f0da1f8bd88394a11
MD5 b330d3b3b8894a3e14b47bbdb003772c
BLAKE2b-256 b51641e6c120a77d7528e1c8ea2c761de0ae5706a43b6bc3d999d3a9f4d282bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for valbridge-1.1.0-py3-none-any.whl:

Publisher: release-please.yml on vectorfy-co/valbridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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