Skip to content

Repository files navigation

Manifest SDK Architecture

Manifest for Python

Turn 🔴 4xx API errors into 🟢 2xx in real time.

CI PyPI version PyPI downloads

What is Manifest

Manifest is a self-healing layer that fixes and retries failed API requests on the fly.

  • 🎯 Fix failures automatically before they impact your users.
  • 🔔 Get notified of root causes so you can fix them permanently.
  • 🔌 Works across your stack with internal APIs, external services, and agent tools.

How it works

How the SDK works: every call Manifest does not heal is recorded in the background as metadata (method, URL, status, timing, no body); a failure Manifest can heal is sent with its error, patched, and retried once, returning a 200 OK

Every call your app makes is reported to Manifest as metadata only (method, URL without its query string, status and timing), in the background. A failure Manifest can heal is sent in full, so it can be repaired. What is sent.

Prerequisites

Get started

Start with your agent

"Install Manifest in this app: https://dashboard.manifest.build/prompt-python.md"

Read the prompt →

The prompt finds your entry point and stops to let you paste your key.

Start with code

pip install mnfst

Run your app through the CLI, so Manifest loads before the first request:

export MNFST_KEY='your-project-key'
mnfst run uvicorn main:app

mnfst run prefixes any command — mnfst run gunicorn app:app, mnfst run celery -A tasks worker. Or call manifest() yourself, once at startup:

from mnfst import manifest

manifest()  # Once, at startup.
# Keep making your API calls as usual.

Use the source-level call when there is no command to prefix: AWS Lambda, a notebook, or a start command owned by a host dashboard.

Setup

  1. Create a project in your Manifest dashboard and copy its project key.
  2. Set the key as an environment variable:
export MNFST_KEY='your-project-key'

Load the SDK with mnfst run, or call manifest() once at startup, before your first request. Self-healing is enabled by default in your project settings.

Check the install at any time with mnfst doctor.

Try it

Send a request that would normally fail. Manifest catches it, repairs it, and retries:

import httpx
from mnfst import manifest

manifest(on_heal=lambda e: print(f"Healed: {e.heal_status}, Response: {e.replay_status_code}"))

res = httpx.post(
    "https://api.example.com/orders",
    json={"limit": 500},  # Invalid? Manifest fixes it and retries.
)
print(res.status_code)  # See the 200 OK response.

Check your Manifest dashboard to see all repairs and insights.

More

Configuration, limits & development · API contract · Node.js SDK · Website

Releases

Packages

Contributors

Languages