🖥️ Clients

⭐ Asynchronous Client

class anmoku.clients.async_.AsyncAnmoku(debug: bool | None = False, jikan_url: str | None = None, session: ClientSession | None = None, rate_limits: Tuple[Tuple[int, int], Tuple[int, int]] | None = None)[source]

Bases: BaseClient

Asynchronous anmoku client. Uses aiohttp for http and slowstack for rate-limiting.

async close() None[source]
async get(resource: Type[ResourceGenericT], id: SnowflakeT) ResourceGenericT[source]

Get’s the exact resource by id.

jikan_url
async search(resource: Type[SearchResourceGenericT], query: str) SearchResult[SearchResourceGenericT][source]

Searches for the resource and returns a list of the results.

✴️ Synchronous Client

class anmoku.clients.sync.Anmoku(debug: bool | None = False, jikan_url: str | None = None, session: Session | None = None, rate_limits: Tuple[Tuple[int, int], Tuple[int, int]] | None = None)[source]

Bases: BaseClient

The normal synchronous Anmoku client. Uses requests for http and slowstack for rate limiting.

close() None[source]
get(resource: Type[ResourceGenericT], id: SnowflakeT) ResourceGenericT[source]

Get’s the exact resource by id.

jikan_url
search(resource: Type[SearchResourceGenericT], query: str) SearchResult[SearchResourceGenericT][source]

Searches for the resource and returns a list of the results.

⬛ Base Client

class anmoku.clients.base.BaseClient(debug: bool = False)[source]

Bases: ABC

Base class all clients will inherit from.

cache
abstract get(resource: Type[ResourceGenericT], id: SnowflakeT) ResourceGenericT[source]

Get’s the exact resource by id.

logger
abstract search(resource: Type[SearchResourceGenericT], query: str) SearchResult[SearchResourceGenericT][source]

Searches for the resource and returns a list of the results.