Core Types¶
AyncCachingStrategy
¶
Bases: Protocol[EndpointDefinitionGen, TResponse]
Defines a caching strategy for the API.
Source code in src/pomdapi/core/types.py
BaseQueryConfig
dataclass
¶
Defines the base configuration for all API requests.
This class holds common configuration that applies to all requests made through the API, such as base URL and header preparation.
Attributes:
Name | Type | Description |
---|---|---|
base_url |
Optional[str]
|
The base URL for all API requests. If provided, this will be prepended to all request paths. |
prepare_headers |
Callable[[dict[str, str]], dict[str, str]]
|
A callable that takes and returns a headers dictionary. Use this to add authentication, content-type, or other headers to all requests. |
Example
Source code in src/pomdapi/core/types.py
EndpointDefinition
dataclass
¶
Bases: Generic[EndpointDefinitionGen]
Defines an endpoint for the API.
Source code in src/pomdapi/core/types.py
yncCachingStrategy
¶
Bases: Protocol[EndpointDefinitionGen, TResponse]
Defines a caching strategy for the API.