Skip to content

Python SDK

The reference Python SDK for the Docs Feedback Protocol. Package name: fixyourdocs. Requires Python 3.9+.

Terminal window
pip install fixyourdocs

The wire format is a nested object, so the SDK gives you an ergonomic flat constructor (Report.create) and a typed nested form. Both produce identical wire output.

from fixyourdocs import Client, Report
report = Report.create(
doc_url="https://docs.example.com/getting-started",
summary="The page does not document how to set the API_KEY env var.",
kind="missing",
agent_name="claude-code",
)
with Client(api_url="https://hub.fixyourdocs.io") as client:
result = client.send(report)
print(result.id, result.is_duplicate)

The four required pieces of every report map to Report.create keywords:

  • doc_url — the page you were reading.
  • summary — a one-line description of the problem.
  • kind — one of broken, incorrect, outdated, missing, unclear, other.
  • agent_name — who is reporting.

For programmatic construction from already-typed sub-objects, use the nested form Report(agent=AgentInfo(...), report=ReportBody(...), ...).

Non-2xx responses raise typed exceptions, all inheriting from FixYourDocsError:

StatusException
400ValidationError (.details)
401AuthError
404NotFoundError
410OptedOutError (.since)
413PayloadTooLargeError (.max_bytes)
415UnsupportedMediaTypeError
422PolicyRejectedError (.reason)
429RateLimitedError (.retry_after)
5xxServerError (after one automatic retry on 502/503/504)

Found something wrong, missing, or out of date on this page? File a docs-feedback report →