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.0.tar.gz (10.5 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.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cq_schema-0.3.0.tar.gz
  • Upload date:
  • Size: 10.5 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.0.tar.gz
Algorithm Hash digest
SHA256 13cff820dbddf1d32abf20d50387599064d831a1504ac2ba15a7ad6380460a86
MD5 19aa425dc8d49726e75de8cacc630e8d
BLAKE2b-256 4a4ee0bb06592a63858bf952d2be338b2cb403297a87ed7b285e5a85555a531f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cq_schema-0.3.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: cq_schema-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f27fff7dc4171543c963a1ab42a1d2f1b19a1fdfca78b0fcf19fd5db6c2d1d7
MD5 f2ebc61f3d5164bf55cdd715f4f54af5
BLAKE2b-256 189056aec1e48e1e029bf156be22cb034abf5b04ca0d74ea90feb93ac2c4b19c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cq_schema-0.3.0-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

0.3.1

2 files

This release

0.3.0 This release

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