This release is a pre-release and may not be stable for production use.
anibridge-anidb-provider
AniDB provider for the AniBridge project. Implements the anibridge-provider-base interface using the AniDB UDP API to sync watch history, list status, and anime metadata.
Installation
From PyPI:
pip install anibridge-anidb-provider
From source:
pip install git+https://github.com/lusky3/anibridge-anidb-provider.git
Configuration
Add an anidb block to your AniBridge config.yaml:
providers:
anidb:
username: your_username # AniDB account username
password: your_password # AniDB account password
client: your_client_name # Registered AniDB client name (anidb.net/software)
client_version: 1 # Registered client version integer
encrypt: null # Optional AniDB API key for UDP encryption (AES-128-ECB)
# Obtain from https://anidb.net/user/<id>/apikey
nat: false # Set true if running behind NAT
rate_limit: 0.5 # Max UDP requests per second (default 0.5, hard max 1.0)
client and client_version must correspond to a client registered at anidb.net/software — AniDB bans unregistered clients.
Status Mapping
AniDB's MyList only has a state (0=unknown, 1=hdd, 2=cd, 3=deleted) plus a
viewdate timestamp — it has no direct concept of "active", "paused",
"planning", or "repeating". Reads and writes are therefore mapped
independently, and the mapping is lossy in one direction.
Reading an entry (checked in this order):
| Condition | AniBridge status |
|---|---|
viewdate > 0 |
COMPLETED |
state == DELETED |
DROPPED |
| anything else | ACTIVE |
Writing a status (best available approximation):
| AniBridge status | AniDB state |
viewed |
Reads back as |
|---|---|---|---|
COMPLETED / REPEATING |
1 (hdd) |
true |
COMPLETED |
DROPPED |
3 (deleted) |
false |
DROPPED |
ACTIVE / PAUSED |
1 (hdd) |
false |
ACTIVE |
PLANNED / unset |
0 (unknown) |
false |
ACTIVE |
REPEATING and PAUSED don't round-trip: writing either produces a value
that reads back as COMPLETED or ACTIVE respectively. This is intentional
— returning a write error for these statuses would break sync pipelines that
legitimately set them. See the anibridge.providers.anidb.provider module
docstring for the full rationale.
Limitations
- Rate limiting: AniDB enforces a hard limit of one request per two seconds for logged-in sessions. The
rate_limitconfig key defaults to 0.5 req/s. Exceeding 1.0 req/s will result in a temporary ban. - No episode progress: The AniDB UDP API does not return per-episode progress counters. Episode-level sync is not supported.
- No backup_list: The
backup_listoperation is not implemented — AniDB has no bulk export via UDP.
Development
# Install dependencies (including dev group)
uv sync
# Run tests
uv run pytest
# Lint
uv run ruff check src tests
# Format check
uv run ruff format --check src tests
# Auto-fix formatting
uv run ruff format src tests
Releasing
Publishing to PyPI is fully automated by .github/workflows/publish.yml
via PyPI Trusted Publishing (OIDC) —
no API token is stored in the repo.
- Bump
versioninpyproject.toml. - Commit, then tag the commit
vX.Y.Zand push the tag:git tag vX.Y.Z git push origin vX.Y.Z
- The
Publishworkflow builds the package withuv buildand publishes it to PyPI on any push of av*tag. No manualtwine upload/token step is needed.
.github/dependabot.yml keeps dependencies (including the uv.lock file)
current on a weekly cadence; review and merge those PRs as they come in.
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_anidb_provider-0.1.0a1.tar.gz.
File metadata
- Download URL: anibridge_anidb_provider-0.1.0a1.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c803bc9409d83dee1b524b21bc18f92a6d8f0aae4838144c7029fc18c3206ac4
|
|
| MD5 |
12ac9da669c1fbfff8c3f67fcb58a43d
|
|
| BLAKE2b-256 |
12bf1b5bc7c3cc7bfe309703df7d6c486c51dda43c4e01fc1e1da7eb8a9f958f
|
Provenance
The following attestation bundles were made for anibridge_anidb_provider-0.1.0a1.tar.gz:
Publisher:
publish.yml on lusky3/anibridge-anidb-provider
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anibridge_anidb_provider-0.1.0a1.tar.gz -
Subject digest:
c803bc9409d83dee1b524b21bc18f92a6d8f0aae4838144c7029fc18c3206ac4 - Sigstore transparency entry: 2510136440
- Sigstore integration time:
-
Permalink:
lusky3/anibridge-anidb-provider@8e3e6382ebfbd353b6e604a7a5e681b1ca76c82b -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/lusky3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8e3e6382ebfbd353b6e604a7a5e681b1ca76c82b -
Trigger Event:
push
-
Statement type:
File details
Details for the file anibridge_anidb_provider-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: anibridge_anidb_provider-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b52c5c3b2ff37529a02c7add7f6d1daa5170a5c51e2a71b4dfcf34161eb69fff
|
|
| MD5 |
34d16230f6e2e62f5e970711940e85cf
|
|
| BLAKE2b-256 |
7c824d06f05277ee5a802c3c18e641e631dd2a5bc97061c0a126f0623af1a022
|
Provenance
The following attestation bundles were made for anibridge_anidb_provider-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on lusky3/anibridge-anidb-provider
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
anibridge_anidb_provider-0.1.0a1-py3-none-any.whl -
Subject digest:
b52c5c3b2ff37529a02c7add7f6d1daa5170a5c51e2a71b4dfcf34161eb69fff - Sigstore transparency entry: 2510136472
- Sigstore integration time:
-
Permalink:
lusky3/anibridge-anidb-provider@8e3e6382ebfbd353b6e604a7a5e681b1ca76c82b -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/lusky3
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8e3e6382ebfbd353b6e604a7a5e681b1ca76c82b -
Trigger Event:
push
-
Statement type: