cheesechaser.datapool.bangumibase

This module provides a data pool implementation for the BangumiBase dataset.

The BangumiBase dataset is a comprehensive collection of anime and manga information. This module extends the IncrementIDDataPool to specifically handle the BangumiBase dataset, providing an easy-to-use interface for accessing and managing this data.

Note

The dataset deepghs/bangumibase_full is gated, you have to get the access of it before using this module.

BangumiBaseDataPool

class cheesechaser.datapool.bangumibase.BangumiBaseDataPool(revision: str = 'main', hf_token: str | None = None)[source]

A data pool class for managing and accessing the BangumiBase dataset.

This class extends the IncrementIDDataPool to provide specific functionality for the BangumiBase dataset. It simplifies the process of initializing the data pool with the correct repository and revision information.

The BangumiBaseDataPool allows users to easily interact with the BangumiBase dataset, providing methods for retrieving, updating, and managing anime and manga information.

Parameters:
  • revision (str) – The specific revision of the BangumiBase dataset to use. Defaults to ‘main’.

  • hf_token (Optional[str]) – An optional Hugging Face token for accessing private repositories. Defaults to None.

Example:

To create a BangumiBaseDataPool instance:

>>> pool = BangumiBaseDataPool()
>>> # Or with a specific revision
>>> pool = BangumiBaseDataPool(revision='v1.2.3')
>>> # Or with a Hugging Face token
>>> pool = BangumiBaseDataPool(hf_token='your_hf_token_here')
__init__(revision: str = 'main', hf_token: str | None = None)[source]

Initialize the BangumiBaseDataPool.

This constructor sets up the data pool with the BangumiBase dataset repository and the specified revision. It uses the same repository for both data and index.

Parameters:
  • revision (str) – The specific revision of the BangumiBase dataset to use. Defaults to ‘main’.

  • hf_token (Optional[str]) – An optional Hugging Face token for accessing private repositories. Defaults to None.