ODIN v1.0 state capsule protocol
Project description
ODIN Protocol Python SDK
Python SDK for the ODIN AI state interchange protocol.
Installation
pip install odin-protocol
Quick Start
from odin_protocol import create_odin_file, pack_odin, unpack_odin
# Create an ODIN file
odin_file = create_odin_file(
content_type="text/plain",
data="Hello, ODIN Protocol!",
creator="your-app",
description="Example ODIN file"
)
# Pack to binary format
packed_data = pack_odin(odin_file)
# Unpack back to OdinFile
unpacked_file = unpack_odin(packed_data)
Features
- Complete ODIN v1.0 format implementation
- Deterministic msgpack serialization
- zlib compression with CRC32C checksums
- Ed25519 and RSA-PSS digital signatures
- ChaCha20-Poly1305 encryption
- HTTP client for ODIN service endpoints
- Comprehensive test suite
API Reference
Core Functions
pack_odin()- Pack ODIN file to binary formatunpack_odin()- Unpack binary ODIN filesign_odin()- Sign ODIN file dataverify_odin()- Verify ODIN file signatureencrypt_odin()- Encrypt ODIN file fieldsdecrypt_odin()- Decrypt ODIN fileopen_chain()- Open .odin.chain files
HTTP Client
from odin_protocol import OdinClient
client = OdinClient(
base_url="https://api.odin.ai",
api_key="your-api-key"
)
# Submit files to mediator
result = client.mediator_submit([packed_data])
# Evaluate rules
result = client.rules_evaluate("rule-id", {"input": "data"})
# Registry operations
client.registry_put("key", packed_data)
data = client.registry_get("key")
Development
git clone https://github.com/odin-ai/odin-protocol
cd python/odin-protocol
pip install -e .
pytest
License
MIT License - see LICENSE file for details.
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
odin_protocol-0.1.0.tar.gz
(18.8 kB
view details)
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 odin_protocol-0.1.0.tar.gz.
File metadata
- Download URL: odin_protocol-0.1.0.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab4851e900fd148803b620aa55cbb6c7bf1738535f2a60dd3e2cf857a61637f2
|
|
| MD5 |
738a9e799b3dc5d729d4230edd6c69f6
|
|
| BLAKE2b-256 |
eb7f9cf70231ae2e78411fd6b0bab966d032109e50965acb4c687e99a745d26e
|
File details
Details for the file odin_protocol-0.1.0-py3-none-any.whl.
File metadata
- Download URL: odin_protocol-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e111b9273ffc40d6889728f5916e97983c81bd6af0eb7d662bacd4730262b0e1
|
|
| MD5 |
6736c9f3ac5b4c4de903fee7c2c9c777
|
|
| BLAKE2b-256 |
8c3d25bca479f7f236758b84556eb99488873a72e2c86434a1d2189508f1acfe
|