List provider base classes for the AniBridge project.
Project description
anibridge-list-base
anibridge-list-base provides base classes and utilities to implement and register media list providers for the AniBridge project.
[!IMPORTANT] This package is intended for developers building AniBridge list providers. If you're looking to use AniBridge as an end user, please refer to the AniBridge documentation.
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 raisesNotImplementedError.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; returnNoneif 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 orNoneon failure.user() -> ListUser | None: Return the associated user object, if any.
- Key methods and hooks:
-
ListEntry,ListMedia,ListUser(base classes)ListEntrystores and exposes properties and setters forprogress,repeats,review,status(ListStatus),user_rating,started_at,finished_at, andtotal_units, plus amedia()method returning the associatedListMedia.ListMediastoresmedia_type(ListMediaType), optionallabels,poster_image,external_url, andtotal_units.ListUseris an immutable dataclass withkeyandtitle.ListTargetpairs a resolvedMappingDescriptorwith a provider media key.user_ratingis 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
priorityfor comparison.
- Enum of common list statuses:
Examples
You can view the following built-in provider implementations as examples of how to implement the base classes:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anibridge_list_base-0.2.0b7.tar.gz.
File metadata
- Download URL: anibridge_list_base-0.2.0b7.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb6a4999b6ce90c9d1d4273dc72c3f2dcf6fb9089fcdb84545932d76ccc1edc8
|
|
| MD5 |
837dc227af2ec730c2442a6ba48065c2
|
|
| BLAKE2b-256 |
a3748d3b8908b19b1c4301b316b33635392618c066e5ec7c5a382cc00579d075
|
File details
Details for the file anibridge_list_base-0.2.0b7-py3-none-any.whl.
File metadata
- Download URL: anibridge_list_base-0.2.0b7-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
873b45bfdadfbec24927ff0bc306822f8e81c59462431df5b838e9c15fb54a3a
|
|
| MD5 |
58fc06c8f0574c1c32a557088ae0637f
|
|
| BLAKE2b-256 |
2e7fdcb28adfcdbbc6d9b8ca6104d26f0b0f5f9851fcdf29a3d07c49fedebec6
|