pds.api_client.api_response module
API response object.
- class pds.api_client.api_response.ApiResponse(*, status_code: int, headers: Mapping[str, str] | None = None, data: T, raw_data: bytes)[source]
Bases:
BaseModel
,Generic
[T
]API response object
- data: T
- headers: Mapping[str, str] | None
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'data': FieldInfo(annotation=~T, required=True, description='Deserialized data given the data type'), 'headers': FieldInfo(annotation=Union[Mapping[str, str], NoneType], required=False, description='HTTP headers'), 'raw_data': FieldInfo(annotation=bytes, required=True, description='Raw data (HTTP response body)', metadata=[Strict(strict=True)]), 'status_code': FieldInfo(annotation=int, required=True, description='HTTP status code', metadata=[Strict(strict=True)])}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- raw_data: StrictBytes
- status_code: StrictInt