edri.api.dataclass package¶
Submodules¶
edri.api.dataclass.api_event module¶
- edri.api.dataclass.api_event.api(cls: type[_E], /) type[_E][source]¶
- edri.api.dataclass.api_event.api(cls: None = None, /, *, init: bool = True, repr: bool = True, eq: bool = True, order: bool = False, unsafe_hash: bool = False, frozen: bool = False, match_args: bool = True, kw_only: bool = False, slots: bool = False, weakref_slot: bool | None = None, url: str | None = None, resource: str | None = None, handling: EventHandlingType | None = None, exclude: list[ApiType] | set[ApiType] | None = None, template: str | None = None, shareable: bool = False, method: HTTPMethod | None = None) Callable[[type[_E]], type[_E]]
edri.api.dataclass.client module¶
- class edri.api.dataclass.client.Client(socket: multiprocessing.connection.Connection, type: edri.config.constant.ApiType)[source]¶
Bases:
object
edri.api.dataclass.file module¶
- class edri.api.dataclass.file.File(file_name: str | None, mime_type: str, path: pathlib._local.Path | edri.utility.shared_memory_pipe.SharedMemoryPipe, fingerprint: str | None = None)[source]¶
Bases:
object- fingerprint: str | None = None¶
edri.api.dataclass.range module¶
- class edri.api.dataclass.range.RangeSpec(first: int | None = None, last: int | None = None, suffix_length: int | None = None)[source]¶
Bases:
object
- class edri.api.dataclass.range.RangeValue(unit: str, specs: tuple[edri.api.dataclass.range.RangeSpec, ...])[source]¶
Bases:
object- content_length(start: int, end: int) int[source]¶
Content-Length for a single resolved range body (206).
- content_range(full_length: int | None, start: int, end: int) str[source]¶
Build Content-Range for a single range response (206).
- Parameters:
full_length -- total representation length, or None if unknown.
start -- inclusive byte positions of the payload actually served.
end -- inclusive byte positions of the payload actually served.
- Returns:
e.g.
bytes 0-99/1234orbytes 0-99/*