Miadi
Miadi is a narrative computing hub for distributed systems. This package serves as the primary wrapper for the Miadi platform.
Status
This package is currently a placeholder and wrapper for the broader Miadi platform components.
Installation
pip install miadi
Usage
miadi --help
miadi.llm: Claude through the Langfuse AI Gateway
The gateway holds the Anthropic key and records every call as a Langfuse trace. A caller needs a gateway key and host:
pip install 'miadi[llm]' # 'miadi[langchain]' adds ChatAnthropic
export LANGFUSE_GATEWAY_HOST=https://gateway.cloud.langfuse.com
export LANGFUSE_GATEWAY_KEY=... # a gateway key
python -m miadi.llm models # model ids the key can call
python -m miadi.llm ping # one short call to claude-haiku-5-5, prints the trace id
from miadi.llm import TraceContext, create_message, chat_model
answer = create_message(
trace=TraceContext(trace_name="chapter-draft", session_id="story-42", tags="storytelling,draft"),
model="claude-haiku-5-5",
max_tokens=2048,
messages=[{"role": "user", "content": "Open a story about a weaver."}],
)
print(answer.message.content[0].text, answer.trace_address) # miadi-tracing:eng/trace/<id>
llm = chat_model("claude-haiku-5-5", trace=TraceContext(trace_name="storytelling")) # LangChain
Trace labels (trace_name, session_id, tags, metadata, environment, user_id) become the
gateway's langfuse-* request headers. A bare model id is sent as anthropic:<id>. Specification:
packages/miadi/rispecs/llm-gateway/ in jgwill/Miadi.
Metadata
Release files for miadi 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| miadi-0.2.0.tar.gz | 9.2 kB | Without provenance | Details for miadi-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| miadi-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for miadi-0.2.0-py3-none-any.whl |
Total release size: 17.0 kB
Release files / miadi-0.2.0.tar.gz
| Download URL | miadi-0.2.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44f75364189a524124cad311a8466a1d6d493d9b909a09ab703f31dec56e46f8
|
|
BLAKE2b-256 checksum How to use checksums |
05d5cf2ce12229518fde9d3410198024adbd6745c0ffc70762b951bfaf9e632e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / miadi-0.2.0-py3-none-any.whl
| Download URL | miadi-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78c2bff2d4857f6f92ffadfb289c476cfd708c0cd9785523b02fadfed76dc2f3
|
|
BLAKE2b-256 checksum How to use checksums |
85ad1dd091aaf65bf850b7a8d071114e773163ebbfb1435d03d8633aa881b770
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for miadi 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.