Skip to main content

cq-schema

Canonical JSON Schemas and parsed scoring values for cq.

This package ships:

  • The JSON Schema documents that define the cq wire format (knowledge units, scoring, query/propose/confirm/flag/review payloads, health, stats).
  • Parsed scoring constants (relevance weights, confidence bounds) drawn from scoring.values.json.

The package deliberately ships no JSON Schema validator. Consumers that need runtime validation can pass load_schema_bytes(name) (or load_schema(name)) to their preferred library (e.g. jsonschema).

Usage

import json

import jsonschema

from cq_schema import (
    CONFIRMATION_BOOST,
    DOMAIN_WEIGHT,
    INITIAL_CONFIDENCE,
    load_schema,
    load_schema_bytes,
)

# Parsed constants (immutable; treat as read-only).
print(DOMAIN_WEIGHT, INITIAL_CONFIDENCE, CONFIRMATION_BOOST)

# Raw schema documents.
schema = load_schema("knowledge_unit")
jsonschema.validate(instance=my_unit, schema=schema)

# Or as bytes if your validator prefers.
raw = load_schema_bytes("scoring")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cq_schema-0.3.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

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

cq_schema-0.3.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file cq_schema-0.3.1.tar.gz.

File metadata

  • Download URL: cq_schema-0.3.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cq_schema-0.3.1.tar.gz
Algorithm Hash digest
SHA256 f07b603dfb6914fbf9a62513b3dd28f41e5f00004da787baec5def5e52dbb2df
MD5 1362fdd866b45352a62cf06363ffdfa3
BLAKE2b-256 bf27759dc9fab647ff179f6efaef15da2ad6f5fdc7aecb34357747fa2fdb0694

See more details on using hashes here.

Provenance

The following attestation bundles were made for cq_schema-0.3.1.tar.gz:

Publisher: release-schema.yaml on mozilla-ai/cq

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

File details

Details for the file cq_schema-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: cq_schema-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cq_schema-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4401791e27f42546b9a76e8fba14ae629dea9c025429578f35bbcde7f74d2c12
MD5 d481d7c0fb5cda6d67c2b0eda6f4733e
BLAKE2b-256 7981b97688562c29632cde18ec6f71ba93556ebe40e1a4a253d9119fcc58c20c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cq_schema-0.3.1-py3-none-any.whl:

Publisher: release-schema.yaml on mozilla-ai/cq

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

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page