Skip to main content

Marona Python SDK

Universal Model Gateway and MCP/Skill SDK for Python 3.10+.

Install

pip install marona==1.1.1

Authentication

A project-scoped Marona Developer Key is mandatory for every client and runtime mode. Pass api_key explicitly or set MARONA_API_KEY.

from marona import Marona

marona = Marona(api_key=marona_developer_key)

Missing, invalid, revoked, and expired keys raise typed MaronaAuthenticationError subclasses. Create and rotate keys in the Marona Developer Portal.

Universal Model Gateway

response = marona.responses.create(
    model="marona/auto",
    input="Review this architecture.",
    routing={
        "strategy": "balanced",
        "allowed_models": [
            "marona/auto",
            "marona/company-assistant",
        ],
    },
)

print(response.output)

Every model name must use the marona/* namespace. marona/auto delegates selection to the project-scoped Model Registry; named aliases such as marona/company-assistant resolve there. Provider credentials and custom endpoints are configured once through the Marona Developer Portal or Model Registry API. They are write-only and never exposed through this package.

All calls—including registered Edge models—go through authenticated Marona Runtime. There is no direct-provider, local-executor, credential-cache, or public model-registration bypass.

Agents and Hub tools

from marona import Agent, Runner

tools = marona.hub.connect(apps=["sda-books"])
agent = Agent(
    name="Customer Assistant",
    model="marona/auto",
    instructions="Help clearly.",
    tools=tools,
)

result = Runner.run(
    agent,
    "Download Steps to Christ",
    user_id="customer_482",
    session_id="chat_91a7",
)
print(result.output)

The SDK also supports streaming, realtime, handoffs, delegation, A2A peers, validated function tools, lifecycle hooks, and published Marona Skills while keeping every model invocation behind the Universal Model Gateway.

Errors

MaronaError exposes code, request_id, retryable, required_action, retry_after_ms, and safe details. Typed subclasses cover authentication, namespace/model, credits, upstream service, custom model, billing, and Marona availability failures. Responses expose only safe routing fields, never upstream endpoints or raw provider payloads.

External MCP federation

registered = marona.hub.register_mcp_server(
    name="Microsoft 365 Outlook Mail",
    slug="microsoft-365-mail",
    server_url=(
        "https://agent365.svc.cloud.microsoft/agents/tenants/"
        f"{os.environ['MICROSOFT_TENANT_ID']}/servers/mcp_MailTools"
    ),
    auth_mode="oauth2",
)
server_id = registered["server"]["id"]
authorization = marona.hub.start_mcp_oauth(
    server_id, user_subject="YOUR_APPLICATION_USER_ID"
)
print(authorization["authorization_url"])
marona.hub.verify_mcp_server(server_id)
marona.hub.activate_mcp_server(server_id)
tools = marona.hub.connect(apps=["microsoft-365-mail"])

Marona manages the Microsoft OAuth client; each application user only follows the authorization URL and consents. Use the same user_subject as the runtime user_id afterward. Register the official Files endpoint when agents need OneDrive or SharePoint content, including stored Excel and PowerPoint files.

An unscoped connect() returns every capability available to the developer key. External calls always pass through Marona's governed gateway; upstream credentials and direct external endpoints are never returned to the SDK.

Release

Version 1.1.1 is published to PyPI from tag python-v1.1.1 only after tests, wheel/sdist validation, and coordinated release checks succeed on main.

Metadata

Release files for marona 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marona 1.1.1
File Size Uploaded Provenance Actions
marona-1.1.1.tar.gz 88.2 kB With provenance Details for marona-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for marona 1.1.1
File Interpreter ABI Platform Actions
marona-1.1.1-py3-none-any.whl Python 3 none any Details for marona-1.1.1-py3-none-any.whl

Total release size: 165.4 kB

Release files / marona-1.1.1.tar.gz

Download URL marona-1.1.1.tar.gz
Size 88.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ea3c43967c9bf781b4ed4bdfcc04c14607ba694ff9b9ef1f1121be77e8049d36
BLAKE2b-256 checksum
How to use checksums
a88ce6686fb8f01945e59bea284c9b906d458aaac3ba411972657ca08fad041c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / marona-1.1.1-py3-none-any.whl

Download URL marona-1.1.1-py3-none-any.whl
Size 77.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2c175f8c5b7ee52d51b330deaf433badcd04f0798d27c15772fb74a5c4fc590
BLAKE2b-256 checksum
How to use checksums
a850d539a7c015fed03bf3e96bdca41cf1c9ee909991b3d67075546d3b6cc473
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Security for marona 1.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for marona-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page