aimarket-oracle-core
Shared infrastructure for the alexar76 oracle family — the layer that turns a pure function into a sellable, verifiable capability on AIMarket Protocol v2.
An oracle written on top of this declares its capabilities and its maths. Everything else — the HTTP surface, the signed manifest, priced invoke, Ed25519 receipts, measured latency and success metrics, rate limiting, and hub federation — comes from here.
from oracle_core import Capability, OracleSpec
SPEC = OracleSpec(
name="Example Oracle",
product_id="prod-example",
description="What it sells, in a sentence an agent can choose on.",
capabilities=[
Capability(
capability_id="example.double@v1",
product_id="prod-example",
description="Return twice the input.",
handler=lambda d: {"result": 2 * float(d["value"])},
input_schema={"type": "object", "required": ["value"],
"properties": {"value": {"type": "number"}}},
output_schema={"type": "object", "required": ["result"],
"properties": {"result": {"type": "number"}}},
price_per_call_usd=0.001,
),
],
)
Install
pip install aimarket-oracle-core
The distribution is aimarket-oracle-core; the import is oracle_core. The unprefixed
name oracle-core on PyPI is an unrelated project that installs a module of the same
name — installing it in place of this one fails at
ImportError: cannot import name 'Capability' from 'oracle_core'.
What you get
| Protocol | .well-known/ai-market.json discovery, v2 manifest, priced invoke |
| Signing | Ed25519 manifest signatures and 7-field receipts, canonical form shared with the hub; optional hybrid post-quantum via the pqc extra |
| Metrics | measured p50_latency_ms and success_rate_30d, not declared constants |
| Safety | handler exceptions become named refusals ({"ok": false, "error": …}) rather than opaque 500s |
| Federation | manifests a hub can verify byte-for-byte and re-list |
Extras
pqc— hybrid post-quantum signatures (dilithium-py)dev— pytest, pytest-asyncio, httpx
Apache-2.0.
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 aimarket_oracle_core-0.2.0.tar.gz.
File metadata
- Download URL: aimarket_oracle_core-0.2.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd389fe2c76b7950a474428ed3fbef7a0c24c7e01a7ea204f03b60f33743d04a
|
|
| MD5 |
5be1803469131dda9cd77bc8c9f19bfb
|
|
| BLAKE2b-256 |
d3c08dcb016677dfe9fd18e9703bb4a8d6b629eea01c5661ad3364ee3dfb6bb2
|
File details
Details for the file aimarket_oracle_core-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aimarket_oracle_core-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06e40a0430a6f9f734621b3810c59e7db9ddabf4b3fdda59762ad68571cccf6e
|
|
| MD5 |
fec0d4b46215ac132e6a3577334bfe61
|
|
| BLAKE2b-256 |
d6b5684ed5d65f11726b836b48355c6f571f3d6ebb266fd0ea5da126a0c605c6
|