aoptk.literature.utils

Classes

AsyncRequestLimiter

Asynchronous request limiter to control the rate of API calls.

Functions

is_europepmc_id(→ bool)

Check if the given publication ID is a EuropePMC ID.

Module Contents

class aoptk.literature.utils.AsyncRequestLimiter(requests_per_second: int)[source]

Asynchronous request limiter to control the rate of API calls.

min_interval[source]
_lock[source]
_next_allowed = 0.0[source]
async wait_turn() None[source]

Wait until it’s the turn for the next request based on the rate limit.

aoptk.literature.utils.is_europepmc_id(publication_id: str) bool[source]

Check if the given publication ID is a EuropePMC ID.