swh.counters.api.client module

class swh.counters.api.client.RemoteCounters(url, api_exception=None, timeout=None, chunk_size=4096, reraise_exceptions=None, **kwargs)[source]

Bases: swh.core.api.RPCClient

Proxy to a remote counters API

backend_class

alias of swh.counters.interface.CountersInterface

add(collection: str, keys: Iterable[Any]) None

Add the provided keys to the collection Only count new keys.

check()

Dedicated method to execute some specific check per implementation.

get_count(collection: str) int

Return the number of keys for the provided collection

get_counters() Iterable[str]

Return the list of managed counters

get_counts(collections: List[str]) Dict[str, int]

Return the number of keys for the provided collection