Skip to main content

The database for knowledge you can verify

Project description

Attest

PyPI - attestdb PyPI - attest-py Tests Python 3.11+ License: BSL-1.1

Licensed under the Business Source License 1.1. Free to use, modify, and self-host. Cannot be offered as a competing managed service. Converts to Apache 2.0 after 4 years.

A claim-native database for building reality models -- structured, provenanced, continuously-learning representations of organizational knowledge.

Claims are the atomic primitive. The graph is derived, not primary. Everything can be rebuilt from the claim log. Provenance is structural -- the engine rejects writes without a valid provenance chain.

Install

pip install attestdb

Quick Start

import attestdb

db = attestdb.open("my_knowledge.db")

# Ingest a claim with provenance
db.ingest(
    subject=("BRCA1", "gene"),
    predicate=("associated_with", "relates_to"),
    object=("Breast Cancer", "disease"),
    provenance={"source_type": "literature_extraction", "source_id": "PMID:12345"},
    confidence=0.9,
)

# Query the knowledge graph
frame = db.query("BRCA1", depth=2)
print(frame.focal_entity.name)
for rel in frame.direct_relationships:
    print(f"  --[{rel.predicate}]--> {rel.target.name} (conf={rel.confidence:.2f})")

db.close()

Rust Backend

For 100x faster ingestion (1M+ claims/sec), install the optional Rust engine:

pip install attest-py

Attest uses the Rust storage engine for all operations.

Core Capabilities

  • Provenance-tracked claims -- every fact has a source chain
  • Confidence scoring -- Tier 1 (direct evidence) + Tier 2 (corroboration)
  • Retraction with cascade -- db.retract("source_123") propagates downstream
  • Time travel -- db.at(timestamp) for point-in-time views
  • Snapshot/Restore -- db.snapshot(path) and AttestDB.restore(path)
  • MCP server -- expose your knowledge graph to AI agents
  • Embedding index -- HNSW similarity search via usearch
  • Audit chain -- tamper-evident Merkle hash chain on append-only log

Intelligence Layer (Enterprise)

LLM-powered features (curation, text extraction, chat ingestion, connectors, insight engine) are available in attestdb-enterprise:

pip install attestdb-enterprise

Optional Dependencies

pip install attestdb[mcp]   # MCP server for AI agents
pip install attestdb[all]   # everything

CLI

attest stats my.db              # Show database statistics
attest query my.db BRCA1        # Query knowledge around an entity
attest schema my.db             # Show knowledge graph schema
attest serve --port 8892        # Start MCP server
attest ingest file.json --db my.db  # Ingest claims from file

Documentation

See docs/ for full architecture and design documentation:

  • docs/02_architecture.md -- Full technical architecture
  • docs/06_api_spec.md -- API contract and validation rules
  • docs/07_design_decisions.md -- Critical decisions with rationale

Running Tests

pip install attestdb[dev]
pytest tests/unit/ tests/integration/   # ~35 tests, <30s
cd rust && cargo test                   # Rust unit + golden vectors

License

Business Source License 1.1 -- free to use, modify, and self-host. Converts to Apache 2.0 after 4 years.

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

attestdb-0.1.4.tar.gz (271.4 kB view details)

Uploaded Source

Built Distribution

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

attestdb-0.1.4-py3-none-any.whl (144.2 kB view details)

Uploaded Python 3

File details

Details for the file attestdb-0.1.4.tar.gz.

File metadata

  • Download URL: attestdb-0.1.4.tar.gz
  • Upload date:
  • Size: 271.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for attestdb-0.1.4.tar.gz
Algorithm Hash digest
SHA256 9908bb9a0e6f9f863a5917fb5a966027a1ea1c4d84a4676c465021f13c44c3b1
MD5 8626a57580149b9002cd0ddb1f3cd28d
BLAKE2b-256 7b7bfa2dd74df129d982d0607c723a25ee6d009e3843e00ae2232486ef31f2f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for attestdb-0.1.4.tar.gz:

Publisher: publish.yml on omic/attest

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

File details

Details for the file attestdb-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: attestdb-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 144.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for attestdb-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ee719272ced7dfc6550cd73c1c357162e11968aa6b772165d9268b11d47f92dd
MD5 7b684e2fc318e9915d1d0de38f7d0d92
BLAKE2b-256 ce32101e9568ec85e3cc8bbf56126162b91a0b5e646fd436782511b308d99447

See more details on using hashes here.

Provenance

The following attestation bundles were made for attestdb-0.1.4-py3-none-any.whl:

Publisher: publish.yml on omic/attest

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