Skip to main content
Pre-release

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.

CI

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_limit config 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_list operation 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.

  1. Bump version in pyproject.toml.
  2. Commit, then tag the commit vX.Y.Z and push the tag:
    git tag vX.Y.Z
    git push origin vX.Y.Z
    
  3. The Publish workflow builds the package with uv build and publishes it to PyPI on any push of a v* tag. No manual twine 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

anibridge_anidb_provider-0.1.0a1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anibridge_anidb_provider-0.1.0a1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file anibridge_anidb_provider-0.1.0a1.tar.gz.

File metadata

File hashes

Hashes for anibridge_anidb_provider-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 c803bc9409d83dee1b524b21bc18f92a6d8f0aae4838144c7029fc18c3206ac4
MD5 12ac9da669c1fbfff8c3f67fcb58a43d
BLAKE2b-256 12bf1b5bc7c3cc7bfe309703df7d6c486c51dda43c4e01fc1e1da7eb8a9f958f

See more details on using hashes here.

Provenance

The following attestation bundles were made for anibridge_anidb_provider-0.1.0a1.tar.gz:

Publisher: publish.yml on lusky3/anibridge-anidb-provider

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anibridge_anidb_provider-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for anibridge_anidb_provider-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 b52c5c3b2ff37529a02c7add7f6d1daa5170a5c51e2a71b4dfcf34161eb69fff
MD5 34d16230f6e2e62f5e970711940e85cf
BLAKE2b-256 7c824d06f05277ee5a802c3c18e641e631dd2a5bc97061c0a126f0623af1a022

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 files

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