Skip to main content

anibridge-list-base

anibridge-list-base provides base classes and utilities to implement and register media list providers for the AniBridge project.

Installation

pip install anibridge-list-base
# pip install git+https://github.com/anibridge/anibridge-list-base.git

API reference

The package exposes its public API from anibridge.list and the core definitions in anibridge.list.base.

To get more context, explore the anibridge.list.base module's source code and docstrings.

  • ListProvider (base class)

    • Key methods and hooks:
      • __init__(*, logger: ProviderLogger, config: dict | None = None) -> None: Construct a provider with an injected logger and optional configuration.
      • async backup_list() -> str: Optional backup hook returning a string representation of the user's list. The base implementation raises NotImplementedError.
      • async clear_cache() -> None: Optional cache clearing hook that AniBridge will occasionally run to free up memory and prevent stale data.
      • async close() -> None: Optional cleanup hook called when the provider is shut down or reloaded.
      • async delete_entry(key: str) -> None: Delete a list entry.
      • async resolve_mapping_descriptors(descriptors: Sequence[MappingDescriptor]) -> Sequence[ListTarget]: Resolve mapping descriptors into provider media keys.
      • async get_entries_batch(keys: Sequence[str]) -> Sequence[ListEntry | None]: Optional batch helper to fetch multiple entries at once.
      • async get_entry(key: str) -> ListEntry | None: Fetch a user's list entry; return None if not present.
      • async initialize() -> None: Optional async initialization called once after construction. Perform network I/O, authentication, or pre-fetching here.
      • async restore_list(backup: str) -> None: Optional backup restore hook. The base implementation is a no-op.
      • async search(query: str) -> Sequence[ListEntry]: Optional search helper returning matching entries.
      • async update_entries_batch(entries: Sequence[ListEntry]) -> Sequence[ListEntry | None]: Optional batch helper to update multiple entries at once.
      • async update_entry(key: str, entry: ListEntry) -> ListEntry | None: Update an entry; return the updated entry or None on failure.
      • user() -> ListUser | None: Return the associated user object, if any.
  • ListEntry, ListMedia, ListUser (base classes)

    • ListEntry stores and exposes properties and setters for progress, repeats, review, status (ListStatus), user_rating, started_at, finished_at, and total_units, plus a media() method returning the associated ListMedia.
    • ListMedia stores media_type (ListMediaType), optional labels, poster_image, external_url, and total_units.
    • ListUser is an immutable dataclass with key and title.
    • ListTarget pairs a resolved MappingDescriptor with a provider media key.
    • user_rating is a 0-100 integer scale (providers may document their own mapping).
  • ListStatus (StrEnum)

    • Enum of common list statuses: COMPLETED, CURRENT, DROPPED, PAUSED, PLANNING, REPEATING.
    • Includes ordering semantics via priority for comparison.

Examples

You can view the following built-in provider implementations as examples of how to implement the base classes:

Metadata

Release files for anibridge-list-base 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anibridge-list-base 0.2.1
File Size Uploaded Provenance
anibridge_list_base-0.2.1.tar.gz 7.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for anibridge-list-base 0.2.1
File Interpreter ABI Platform
anibridge_list_base-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.3 kB

Release files / anibridge_list_base-0.2.1.tar.gz

Download URL anibridge_list_base-0.2.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c7dfad22a611086af3931c55de9faf98c2eab84de585e349015343afd36f2b48
BLAKE2b-256 checksum
How to use checksums
631ade2e438049678c55e7b0a60b1b65d212ceabe4feb2a2c423f3cd81d01fbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / anibridge_list_base-0.2.1-py3-none-any.whl

Download URL anibridge_list_base-0.2.1-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c51d2c31dea9863b15a39ea0dbbc32b7ae7ccd7e73b5fb0860512de0463c7bb
BLAKE2b-256 checksum
How to use checksums
a966b6f6875beea7ad123c0f7b04d0a6ad5a29232551ba4b79c8a2b2b18d20fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for anibridge-list-base 0.2.1

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.

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