id_translation.fetching.types#

Types related to translation fetching.

Module Attributes

FetchOperation

Key operation types for fetching.

Operation

Key operation types for fetchers.

Classes

FetchInstruction(source, placeholders, ...)

Instructions passed from an AbstractFetcher to an implementation.

IdsToFetch(source, ids)

A source and the IDs to fetch from it.

class FetchInstruction(source, placeholders, required, ids, task_id, enable_uuid_heuristics)[source]#

Bases: Generic[SourceType, IdType]

Instructions passed from an AbstractFetcher to an implementation.

enable_uuid_heuristics#

Improves matching when UUID-like IDs are in use.

Implementations which have no UUID heuristics may silently ignore this flag.

property fetch_all#

If True, retrieve all available data.

ids#

Unique IDs to fetch translations for.

placeholders#

All desired placeholders in preferred order.

required#

Placeholders that must be included in the response.

source#

Where to fetch from.

task_id#

Used for logging purposes.

FetchOperation#

Key operation types for fetching.

alias of Literal[‘FETCH’, ‘FETCH_ALL’]

class IdsToFetch(source, ids)[source]#

Bases: Generic[SourceType, IdType]

A source and the IDs to fetch from it.

ids#

Unique IDs to fetch translations for.

source#

Where to fetch from.

Operation = typing.Literal['INITIALIZE_SOURCES'] | typing.Literal['FETCH', 'FETCH_ALL']#

Key operation types for fetchers.