Skip to main content

outfigure

The Python client for the OutFigure API.

OutFigure keeps three things apart for a learning platform: what a learner did with help, what they did without it, and whether a change to the teaching moved the second. This package sends your learning events and outcomes to the API and reads back evidence, learner states and Outcome Receipts.

The hosted API is a sandbox for invited partners, with test data only. To ask about a pilot, write to hello@outfigure.in.

Install

pip install outfigure

Python 3.11 or later. The client uses the standard library only, so it brings no other packages with it. Use it on your server: an API key never belongs in a browser.

Send an event and read the evidence

import os
from datetime import datetime, timezone

from outfigure import OutFigure

client = OutFigure(
    api_key=os.environ["OUTFIGURE_API_KEY"],
    base_url="https://console.outfigure.in",
)

receipt = client.events.send(
    {
        "schema_version": "1.0",
        "event_id": "evt_demo_0001",
        "event_type": "response",
        "learner_id": "learner_demo_01",
        "occurred_at": datetime.now(timezone.utc).isoformat(),
        "source": "partner_backend",
        "session_id": "session_demo_01",
        "item_id": "question_012",
        "item_version": "1",
        "attempt_id": "attempt_demo_01",
        "attempt_number": 1,
        "response_kind": "binary",
        "correct": True,
        "assistance": "none",
        "hint_count": 0,
        "feedback_seen": False,
    },
    idempotency_key="demo-send-0001",
)

client.jobs.wait(receipt["job_ids"], timeout=15)
state = client.learners.state("learner_demo_01")

One response is thin evidence. A learner's state on a concept stays insufficient_evidence until it has at least five eligible attempts across two sessions, and missing data is never turned into a score.

How it behaves

  • Fields use the API's own names (learner_id, item_version), and requests and responses are typed as TypedDicts in outfigure.types.
  • Network failures and 429, 502, 503 and 504 are retried at most three times, with the same body and idempotency key, honouring Retry-After. Other errors are raised as ApiError with the code, status and request ID.
  • No telemetry, no background work, no local copy of learner data.

The full reference, with every route and scope, is at outfigure.in/developers.

Licence

MIT. This covers the client only; the OutFigure service is not open source.

Metadata

Release files for outfigure 0.2.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 outfigure 0.2.0
File Size Uploaded
outfigure-0.2.0.tar.gz 38.8 kB Details

Built distribution (wheel)

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

Total release size: 69.4 kB

Release files / outfigure-0.2.0.tar.gz

Download URL outfigure-0.2.0.tar.gz
Size 38.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8b9d57004cc2e2dc8de123e1fa8364bad804a20986d65a62e5564051c2014e2a
BLAKE2b-256 checksum
How to use checksums
c888ac790465797b831a4522e97fb13c8f779802ae362ee2286da0edc1a790a5
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 Oct 15, 2026.

Transparency log

Release files / outfigure-0.2.0-py3-none-any.whl

Download URL outfigure-0.2.0-py3-none-any.whl
Size 30.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7e1ec1b4c015bc3f0244a173077f0e5c3267f2ca0420b1f2539abfd7777b1ce
BLAKE2b-256 checksum
How to use checksums
3ad7fa3d5dc9d2ec891d5e70ceb66e0bf67b302a697552a385caa1050055ab55
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 Oct 15, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.0

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