Skip to main content

Hierarchical schema validation with asset management and configuration defaults

This project has been quarantined.

PyPI Admins need to review this project before it can be restored. While in quarantine, the project is not installable by clients, and cannot be being modified by its maintainers.

Read more in the project in quarantine help article.

Project description

schemavault

Hierarchical schema validation with asset management and configuration defaults for Python services.

Installation

pip install schemavault

Usage

import schemavault

# Validate endpoint configurations
err = schemavault.validate('endpoint', {'url': '/api/v1/users', 'method': 'GET'})
if err:
    raise ValueError(err)

# Build URLs with query parameters
url = schemavault.build_url('https://api.example.com', 'users', {'page': '2'})

# Merge header dictionaries
headers = schemavault.merge_headers(
    {'Accept': 'application/json'},
    {'Authorization': 'Bearer token123'}
)

# Get registry defaults
defaults = schemavault.get_defaults()
print(defaults['timeout'])  # 60000
print(defaults['retries'])  # 5

# Normalize endpoint configuration
normalized = schemavault.normalize_endpoint({
    'url': '  /api/users  ',
    'method': 'get',
    'timeout': '5000'
})

Features

  • Schema validation for REST endpoint configurations
  • URL building with path and query parameter support
  • Header merging and normalization
  • Asset management with embedded metadata support
  • Configuration defaults with transport presets
  • Schema diffing and flattening utilities

API

  • validate(schema_name, obj) — validate against named schema
  • validate_url(url) / validate_method(method) / validate_headers(headers)
  • build_url(base, path, query) — construct URL
  • merge_headers(base, extra) — merge header dicts
  • normalize_endpoint(config) — normalize endpoint config
  • schema_diff(old, new) / flatten(obj) / unflatten(flat)
  • get_defaults() / get_registry(key)

License

MIT

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

schemavault-4.1.0.tar.gz (17.4 kB view details)

Uploaded Source

File details

Details for the file schemavault-4.1.0.tar.gz.

File metadata

  • Download URL: schemavault-4.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for schemavault-4.1.0.tar.gz
Algorithm Hash digest
SHA256 987b62c7df4a16b12ecbe9ba4fc9aa52013eea45f702394ead0f4ec15c922073
MD5 ef895991c052300866f5e5bfd38dc840
BLAKE2b-256 92da4e9f360690b916cdd10030f64d5b09f854a6f16a4e67483f5e6bda0f058e

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