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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for valbridge-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7ac02adf3b7babe6da7bacaec403cf8fc0a86d31aff97e8ee9a26c9906a17ef1
MD5 f950c75ae5f2add31f5e38253dfc3010
BLAKE2b-256 01433f668cd4a083403e3cf8ee235175167e81c8776dda46eb4e62baadd20ad7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: valbridge-1.0.2-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.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e6d0486c1c642d4fb5fadc61edefddadb07c19caabaa07180c92fd59e7b2579f
MD5 e8b0bfdfde78904bd740369b46ea1109
BLAKE2b-256 d9e91a968719c60e71839b5d267f1d99c3411df7590ab4f0614d80952051014c

See more details on using hashes here.

Provenance

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