Skip to main content

Module common

Module common 

Source
Expand description

Shared building blocks used across resource clients: the response envelope, query-parameter helpers, pagination types and the User-Agent builder.

Structs§

ListOptions
Standard offset/limit pagination options shared by most list endpoints.
PaginationList
A single page of an offset/limit-paginated list.
QueryParams
A mutable collection of query parameters that serializes booleans as 0/1 and omits None values, matching the Apify API conventions.
StorageListOptions
Options shared by the storage collection list endpoints (GET /v2/datasets, /v2/key-value-stores, /v2/request-queues), which add unnamed and ownership filters on top of the standard offset/limit pagination.

Functions§

build_user_agent
Builds the User-Agent header value mandated by the client requirements: ApifyClient/{version} ({os}; {language version}); isAtHome/{isAtHome}.
create_hmac_signature
Computes an Apify URL-signing signature, byte-for-byte compatible with the platform’s @apify/utilities createHmacSignature.
encode_path_segment
Percent-encodes a single URL path segment, so that values interpolated into the path (such as key-value-store record keys or request IDs) cannot break out of the segment or inject a query string.
sign_storage_content
Builds a storage-content signature for a resource’s public URL, byte-for-byte compatible with the platform’s @apify/utilities createStorageContentSignature.
to_safe_id
Encodes a resource id so it is safe to embed in a URL path. Apify uses the username~resourcename form, so the first / of an id is replaced with ~.