Skip to main content

Value Context Protocol SDK — portable AI ethics validation

Project description

vcp-sdk

Python SDK for the Value Context Protocol (VCP) — a standard for encoding values context (personas, scopes, and behavioral constraints) so AI systems can carry, validate, and exchange it portably. Zero runtime dependencies.

Learn more at valuecontextprotocol.org.

Install

pip install vcp-sdk

Python 3.10+. Optional extra vcp-sdk[jsonschema] enables JSON-schema validation of VCP-Lite documents.

What's in the box

API Purpose
Token Parse and validate VCP/I identity tokens (family.safe.guide@1.0.0:SEC)
canonicalize_token, tokens_equal, uri_to_canonical Token normalization helpers
CSM1Code Parse and validate VCP/S CSM1 structured codes
validate_lite, lite_to_token, lite_to_csm1 Validate VCP-Lite JSON documents and convert them
Context Encode/decode full VCP context payloads

Quick start

from vcp import Token, CSM1Code, canonicalize_token
from vcp.lite import validate_lite, lite_to_token

# VCP/I tokens
token = Token.parse("family.safe.guide@1.0.0:SEC")

# Normalization
canonicalize_token("Family.Safe.Guide@01.0.0")  # -> "family.safe.guide@1.0.0"

# VCP/S CSM1 codes
code = CSM1Code.parse("Z4+P+T+W:SEC")

# VCP-Lite documents
import json
with open("my-values.vcp-lite.json") as f:
    doc = json.load(f)
errors = validate_lite(doc)  # [] when valid, list of messages otherwise
if not errors:
    print(lite_to_token(doc))

Parse failures raise ValueError with a message describing the grammar violation; validate_lite returns error strings instead of raising.

Command-line validation

The creed-space-cli package builds a lint-style CLI on top of this SDK:

creed vcp validate family.safe.guide@1.0.0
creed vcp parse "Z4+P+T+W:SEC"

License

Apache-2.0. Maintained by Creed Space.

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

vcp_sdk-0.3.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

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

vcp_sdk-0.3.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file vcp_sdk-0.3.0.tar.gz.

File metadata

  • Download URL: vcp_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for vcp_sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 18bbc33de767d087c4401e11ab216d99bb6d9fa666de38fdf18d403361481e12
MD5 0c20f631c299ffc7044df7c7465e90e3
BLAKE2b-256 fca94076e3b5b3a11319ae270e08f3860c9e79d15c261ba7908895e9e4185c7a

See more details on using hashes here.

File details

Details for the file vcp_sdk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: vcp_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for vcp_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44e8a385d94f8da1eefe76be56d1d016ecd11ded0081720b1e90fdff3c20c296
MD5 17aae6d8f3fed04c70edb1f047177d8b
BLAKE2b-256 2713a718cd2aaddd23b8a4d4cfdff06a64ef19bda220c8baa5373f95e75e0ab3

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