animedex.transport.read_only

Advisory method classification for raw API calls.

The raw animedex api passthrough does not block HTTP methods on the user’s behalf. This module keeps a small, non-enforcing classifier for documentation, diagnostics, and callers that want to label a request before sending it. A result of False is information only; the transport layer still forwards the user’s chosen method and path.

known_backends

animedex.transport.read_only.known_backends() tuple[source]

Return the tuple of backends known to the advisory classifier.

Returns:

Ordered tuple of backend identifiers.

Return type:

tuple

classify_read_only

animedex.transport.read_only.classify_read_only(backend: str, method: str, path: str) bool | None[source]

Classify whether a method/path pair is known to be read-only.

True means the pair is a known read, False means the pair is not known to be read-only, and None means the backend is not in the advisory registry. The classifier never raises and never blocks transport.

Parameters:
  • backend (str) – Backend identifier (e.g. "anilist").

  • method (str) – HTTP method.

  • path (str) – Request path.

Returns:

Advisory classification.

Return type:

bool or None

selftest

animedex.transport.read_only.selftest() bool[source]

Smoke-test the advisory classifier.

Confirms representative read and non-read classifications without asserting that any request would be blocked.

Returns:

True on success.

Return type:

bool