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.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 outfigure 0.1.0
File Size Uploaded
outfigure-0.1.0.tar.gz 35.6 kB Details

Built distribution (wheel)

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

Total release size: 63.3 kB

Release files / outfigure-0.1.0.tar.gz

Download URL outfigure-0.1.0.tar.gz
Size 35.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1c32d170d8e4a9e6a56e7daefb8d7c76e5606a1d0d7af3495b4549ea09b55b4c
BLAKE2b-256 checksum
How to use checksums
91b11954df00a663784a1932e0867894f6b622675c4888cdb8e9c858b3c604ee
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 10, 2026.

Transparency log

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

Download URL outfigure-0.1.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eee9c4c4dee7ceb0af7f23c5027937609ceb3d6d3e082baf1a249b397cf9d55f
BLAKE2b-256 checksum
How to use checksums
892bd89112598d59da39b5b0798f54aa18f7eba98d44d222dae2eebce7208ede
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 10, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.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