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.2.0.tar.gz (5.0 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.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for valbridge-1.2.0.tar.gz
Algorithm Hash digest
SHA256 1bc808cc18db9c4867b0fab758e8b54d5aac31beb3444985ffbe29e471a6ef66
MD5 493f5209631a0548699abdd7ad5eb812
BLAKE2b-256 934acd82d694137c7f2cef23b74c994fb4dd77a83c40fab4a788b55bbde2d770

See more details on using hashes here.

Provenance

The following attestation bundles were made for valbridge-1.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: valbridge-1.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c2e7ffb0cdffb2942d52ead44be6903372505fb0f312077c75a08170a3e8efc
MD5 dddbd1d4e8a8d71d2324d98932e7ee74
BLAKE2b-256 e896020990b5d0d67e405bda7f8c607eb1d404a127d8b6528a8db92b205acda1

See more details on using hashes here.

Provenance

The following attestation bundles were made for valbridge-1.2.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