Skip to main content

Manifest for Python

CI

Repair failed JSON API requests automatically. Works with httpx and requests, for everyday APIs and LLMs alike.

from mnfst import manifest

manifest()
# Keep making your API calls as usual.

Your API rejects a request → Manifest finds a repair → the SDK retries once, locally.

Setup

1. Install

Requires Python 3.10+:

python -m venv .venv
source .venv/bin/activate
python -m pip install mnfst

On Windows, activate with .venv\Scripts\activate instead. The package and import name are mnfst. httpx is included; install requests separately if you use it.

2. Connect your project

Create a project in your Manifest dashboard and copy the project key shown during setup. In Project Settings, turn Autofix on to enable repairs.

export MNFST_KEY='your-project-key'

The SDK defaults to https://api.manifest.build. For a local app running on port 5310, also set:

export MNFST_URL='http://127.0.0.1:5310'

Your server must support the SDK API contract. The local app must already be running.

3. Initialize before your requests

Call manifest() once at startup. Save this as example.py, replacing the example endpoint and payload with your own:

import httpx
from mnfst import manifest, flush

manifest(
    on_heal=lambda event: print(
        "[manifest]", event.heal_status, event.replay_status_code
    )
)

try:
    response = httpx.post(
        "https://api.example.com/orders",
        json={"limit": 500},
    )
    print(response.status_code, response.text)
finally:
    flush(timeout=5)

Run it with python example.py. For an API that rejects limit: 500 and has a matching repair, Manifest can retry with a valid limit. Repairs depend on the API error and available patches.

The same initialization covers httpx.AsyncClient and requests calls using their standard transports.

Check that it works

Send a JSON request that your test API rejects with 400, 404 or 422. Check the failure in your project's dashboard and the on_heal callback for the repair result. A successful request alone does not contact Manifest. flush() lets a short script wait for outcome reports before exiting.

What to expect

  • One retry. Manifest returns a repair; the SDK sends the corrected request directly to your API.
  • Original error if healing is unavailable. A heal call can add up to 60 seconds. If a retry returns an HTTP response, that response reaches your application.
  • Sync and async. Standard httpx transports and requests adapters are covered process-wide. Custom transports and aiohttp are not intercepted.
  • Retry semantics still matter. Use idempotency keys where needed; a repeated request can repeat side effects.

Privacy

Manifest receives failed request URLs, headers, JSON bodies and error responses. Known credential fields are masked or withheld, but nested secrets, prompts and business data can still be sent. Enable it only for traffic you permit your Manifest server to process and store.

More

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

Release files for mnfst 0.1.0

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

Source distribution (sdist)

Source distribution for mnfst 0.1.0
File Size Uploaded
mnfst-0.1.0.tar.gz 30.5 kB Details

Built distribution (wheel)

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

Total release size: 48.3 kB

Release files / mnfst-0.1.0.tar.gz

Download URL mnfst-0.1.0.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c74e1844b57ffe8673156233fd7aeba9d8afb024cd5362d78010f8f271dbcf16
BLAKE2b-256 checksum
How to use checksums
0c86e96a099ea94cc637faee760f71e679e1d5beeb462ba4541a51742fb940de
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 8, 2026.

Transparency log

Release files / mnfst-0.1.0-py3-none-any.whl

Download URL mnfst-0.1.0-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
caef0c118a0b0c62514e0c3771b5d6464fb5669041637fa509e92f3844e088c9
BLAKE2b-256 checksum
How to use checksums
0b6246c32922ebaf4654eaca1ca3f578495cc7adb7ba5998655e97a32ca127fb
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

1.0.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

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