Python SDK for the Digital Evidence Depository (DED) on Constellation Network
Project description
constellation-digital-evidence-sdk
Python SDK for the Digital Evidence Depository on Constellation Network. Create, sign, and submit cryptographic fingerprints for document notarization.
Install
pip install constellation-digital-evidence-sdk
# With network module:
pip install constellation-digital-evidence-sdk[network]
Modules
Core (default import) — pure cryptographic operations with no network dependencies.
Network (optional extra) — async HTTP client for the Digital Evidence Ingestion API. Requires httpx.
# Core — always available
from constellation_digital_evidence_sdk import generate_fingerprint, GenerateOptions
# Network — requires [network] extra
from constellation_digital_evidence_sdk.network import DedClient, DedClientConfig
Usage
Generate a signed fingerprint
from constellation_digital_evidence_sdk import (
generate_fingerprint,
GenerateOptions,
validate_submission,
)
from constellation_sdk import generate_key_pair
key_pair = generate_key_pair()
submission = generate_fingerprint(
GenerateOptions(
org_id="550e8400-e29b-41d4-a716-446655440000",
tenant_id="123e4567-e89b-12d3-a456-426614174000",
event_id="7ca8c920-0ead-22e2-91c5-11d05fe540d9",
document_id="contract-2024-001",
document_content="This is my document content",
include_metadata=True,
tags={"department": "legal"},
),
key_pair.private_key,
)
validate_submission(submission)
Submit to the API
from constellation_digital_evidence_sdk.network import DedClient, DedClientConfig
async with DedClient(DedClientConfig(
base_url="http://localhost:8081",
api_key="your-api-key",
)) as client:
results = await client.fingerprints.submit([submission])
detail = await client.fingerprints.get_by_hash(hash_value)
stats = await client.fingerprints.get_stats()
Core API
| Export | Description |
|---|---|
generate_fingerprint |
Create, sign, and package a fingerprint in one call |
create_fingerprint_value |
Build the fingerprint value object |
sign_fingerprint |
Sign a fingerprint value with a private key |
hash_document |
SHA-256 hash a document (string or bytes) |
validate_submission |
Validate a submission |
FingerprintGenerator |
Reusable generator with stored config |
compute_metadata_hash |
Compute deterministic metadata hash |
create_metadata |
Create metadata with optional tags |
Signature Protocol
The SDK implements SECP256K1_RFC8785_V1:
- Canonicalize JSON per RFC 8785
- SHA-256 hash the canonical bytes
- Convert hash to hex string, treat as UTF-8 bytes
- SHA-512 hash, truncate to 32 bytes
- Sign with SECP256K1 ECDSA
Development
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest tests/ -v
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file constellation_digital_evidence_sdk-0.3.1.tar.gz.
File metadata
- Download URL: constellation_digital_evidence_sdk-0.3.1.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
670a08ad5806087cb798f3c82261555a8961c5b5ab4913458386d3ceb5d3225d
|
|
| MD5 |
2d3a19693956b757db806242d772e1a9
|
|
| BLAKE2b-256 |
190f9b0f2c082f17b047e4dfa263b38a88a75116d32e8d76fa9f0fee40598977
|
Provenance
The following attestation bundles were made for constellation_digital_evidence_sdk-0.3.1.tar.gz:
Publisher:
publish-py.yml on Constellation-Labs/digital-evidence-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
constellation_digital_evidence_sdk-0.3.1.tar.gz -
Subject digest:
670a08ad5806087cb798f3c82261555a8961c5b5ab4913458386d3ceb5d3225d - Sigstore transparency entry: 1207425873
- Sigstore integration time:
-
Permalink:
Constellation-Labs/digital-evidence-sdk@0be134df4220c17fa9a7528094a84bc7c38b41cf -
Branch / Tag:
refs/tags/python-v0.3.1 - Owner: https://github.com/Constellation-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-py.yml@0be134df4220c17fa9a7528094a84bc7c38b41cf -
Trigger Event:
push
-
Statement type:
File details
Details for the file constellation_digital_evidence_sdk-0.3.1-py3-none-any.whl.
File metadata
- Download URL: constellation_digital_evidence_sdk-0.3.1-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5e0008129106d8074cd5142aa5d86bf084cab665c44c94d7060329bb0bfb0c5
|
|
| MD5 |
a1cbef2d7dd1e4b5ee363ef314ba8f87
|
|
| BLAKE2b-256 |
393c65cc9cb9a2695c85ee222ad80371348946c6f130d81289b10d324a79ff1d
|
Provenance
The following attestation bundles were made for constellation_digital_evidence_sdk-0.3.1-py3-none-any.whl:
Publisher:
publish-py.yml on Constellation-Labs/digital-evidence-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
constellation_digital_evidence_sdk-0.3.1-py3-none-any.whl -
Subject digest:
c5e0008129106d8074cd5142aa5d86bf084cab665c44c94d7060329bb0bfb0c5 - Sigstore transparency entry: 1207425960
- Sigstore integration time:
-
Permalink:
Constellation-Labs/digital-evidence-sdk@0be134df4220c17fa9a7528094a84bc7c38b41cf -
Branch / Tag:
refs/tags/python-v0.3.1 - Owner: https://github.com/Constellation-Labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-py.yml@0be134df4220c17fa9a7528094a84bc7c38b41cf -
Trigger Event:
push
-
Statement type: