AsyncClient¶
async_client ¶
Asynchronous yente / OpenSanctions client.
Mirrors :class:yente_client.client.Client method-for-method; every endpoint
returns a coroutine. Refer to the sync client for per-method documentation —
the only structural differences are language-level (await, async for).
AsyncClient ¶
AsyncClient(
*,
api_key: str | None = None,
base_url: str = DEFAULT_BASE_URL,
app_name: str | None = None,
user_agent: str | None = None,
timeout: float | Timeout | None = None,
verify: bool | str = True,
proxy: str | None = None,
headers: dict[str, str] | None = None,
transport: AsyncBaseTransport | None = None,
)
Asynchronous client for the yente / OpenSanctions API.
Use as an async context manager for deterministic cleanup of the underlying
httpx.AsyncClient. See :class:yente_client.Client for the sync
counterpart.
user_agent
property
¶
Return the User-Agent header this client sends on every request.
adjacent
async
¶
adjacent(
entity_id: str,
*,
prop: str | None = None,
limit: int | None = None,
offset: int = 0,
sort: list[str] | None = None,
) -> AdjacentResponse | AdjacentPropertyResponse
Async equivalent of :meth:yente_client.client.Client.adjacent.
algorithms
async
¶
Async equivalent of :meth:yente_client.client.Client.algorithms.
datasets
async
¶
Async equivalent of :meth:yente_client.client.Client.datasets.
fetch
async
¶
Async equivalent of :meth:yente_client.client.Client.fetch.
healthz
async
¶
Async equivalent of :meth:yente_client.client.Client.healthz.
match
async
¶
match(
entity: EntityInput,
*,
filters: MatchFilters | None = None,
threshold: float | None = None,
algorithm: str | None = None,
weights: dict[str, float] | None = None,
config: dict[str, Any] | None = None,
limit: int | None = None,
**filter_kwargs: Any,
) -> MatchResponse
Async equivalent of :meth:yente_client.client.Client.match.
programs
async
¶
Async equivalent of :meth:yente_client.client.Client.programs.
readyz
async
¶
Async equivalent of :meth:yente_client.client.Client.readyz.
search
async
¶
search(
q: str,
*,
filters: SearchFilters | None = None,
limit: int | None = None,
offset: int = 0,
sort: list[str] | None = None,
fuzzy: bool = False,
simple: bool = False,
facets: list[str] | None = None,
**filter_kwargs: Any,
) -> SearchResponse
Async equivalent of :meth:yente_client.client.Client.search.
statements
async
¶
statements(
*,
dataset: str | None = None,
entity_id: str | None = None,
canonical_id: str | None = None,
prop: str | None = None,
value: str | None = None,
schema: str | None = None,
sort: list[str] | None = None,
limit: int | None = None,
offset: int = 0,
) -> StatementsResponse
Async equivalent of :meth:yente_client.client.Client.statements.