Skip to main content

autonomath (Python SDK)

Python client for the AutonoMath REST API - a catalog of Japanese institutional programs (subsidies, loans, tax incentives) with an exclusion-rule engine.

Install

pip install autonomath

(Currently unpublished; install locally with pip install -e path/to/sdk/python.)

Quick start

from autonomath import Client

c = Client(api_key="am_...")  # or leave None for anonymous free tier

meta = c.meta()
print(meta.total_programs, meta.tier_counts)

resp = c.search_programs(tier=["S", "A"], prefecture="東京都", limit=10)
for p in resp.results:
    print(p.unified_id, p.primary_name, p.tier)

detail = c.get_program(resp.results[0].unified_id)
print(detail.enriched)

check = c.check_exclusions([p.unified_id for p in resp.results])
for hit in check.hits:
    print(hit.rule_id, hit.severity, hit.programs_involved)

Async

import asyncio
from autonomath import AsyncClient

async def main():
    async with AsyncClient(api_key="am_...") as c:
        meta = await c.meta()
        print(meta.total_programs)

asyncio.run(main())

Configuration

Option Default Notes
api_key None X-API-Key header. None = anonymous/free.
base_url https://api.autonomath.ai Override for self-hosted deployments.
timeout 30.0 Per-request seconds.
max_retries 3 Applied to 429 and 5xx responses.

Retry behavior:

  • 429 Too Many Requests respects the Retry-After header (seconds).
  • 5xx retried with exponential backoff (0.5s, 1s, 2s, ...).
  • 4xx other than 429 are raised immediately.

Errors

All SDK errors inherit from autonomath.AutonoMathError:

  • AuthError (401 / 403)
  • NotFoundError (404)
  • RateLimitError (429, carries retry_after)
  • ServerError (5xx)

autonomath.JpintelError is retained as a deprecated alias for AutonoMathError. New code should import AutonoMathError.

Develop

cd sdk/python
python -m venv .venv
.venv/bin/pip install -e ".[dev]"
.venv/bin/pytest

Metadata

Release files for autonomath 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 autonomath 0.1.0
File Size Uploaded Provenance
autonomath-0.1.0.tar.gz 6.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 16.1 kB

Release files / autonomath-0.1.0.tar.gz

Download URL autonomath-0.1.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8163f807283ac7f059d42d0ba2e2d26053560f109e5f3f54d7d2af2a0df6472e
BLAKE2b-256 checksum
How to use checksums
3c0ce5d3295802a029f63ef8a2a0428b72b89bae1361969b39294a1302fda172
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

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

Download URL autonomath-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76ebb744425e0919b410c3566231e72a985230b6d9b3a6eb89358c61246b8a1c
BLAKE2b-256 checksum
How to use checksums
25b556da03387503a74ec1af7913eccb2c7f9db9f3ed7deab388d620e72671fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for autonomath 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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