animedex.backends.trace

High-level Trace.moe Python API.

Exposes screenshot search (URL or upload bytes) plus the quota probe. The common-projection TraceQuota returned by quota() drops the upstream’s caller-IP echo (the /me id field) — callers who want it can use the rich RawTraceQuota directly.

quota

animedex.backends.trace.quota(*, config: Config | None = None, **kw) TraceQuota[source]

Fetch /me: caller’s quota state.

Returns the cross-source projection TraceQuota, which omits the upstream’s id field by design — the common shape is the lowest-common-denominator across backends and IP echoes don’t have a place there. A caller who wants the upstream payload as-is (including id) can reach for the rich RawTraceQuota directly: it round-trips the upstream verbatim.

selftest

animedex.backends.trace.selftest() bool[source]

Smoke-test the Trace.moe API (signatures only, no network).