yggdrasil.pickle.ser.http_¶
http_ ¶
Pickle serializers for :class:~yggdrasil.io.PreparedRequest and
:class:~yggdrasil.io.response.Response.
Wire layout¶
PreparedRequestSerialized (tag PREPARED_REQUEST = 222)
payload = Arrow IPC file bytes for a single-row RecordBatch produced by
request.to_arrow_batch(parse=False). All request fields — method, URL
parts, promoted headers, remaining headers, tags, body bytes, body hash and
sent_at timestamp — are round-tripped through Arrow's own IPC format.
Reconstruction uses PreparedRequest.from_arrow(batch).
ResponseSerialized (tag RESPONSE = 223)
payload = Arrow IPC file bytes for a single-row RecordBatch produced by
response.to_arrow_batch(parse=False). All response fields including
the embedded request are round-tripped. Reconstruction uses
Response.from_arrow_tabular(batch).
Both store a ygg_object hint in the wire Header for debugging; the tag
alone is sufficient for dispatch.
HttpSerialized
dataclass
¶
Bases: Serialized[object]
Base / dispatch hub for yggdrasil.io HTTP serializers.
Not registered as a concrete tag — only the concrete subclasses are.
module_and_name
staticmethod
¶
Return (module, qualname) for obj.
Robust across Python objects, including many C-extension / PyArrow objects where module may be missing or misleading.
PreparedRequestSerialized
dataclass
¶
Bases: HttpSerialized
Serialize a :class:~yggdrasil.io.PreparedRequest as Arrow IPC.
module_and_name
staticmethod
¶
Return (module, qualname) for obj.
Robust across Python objects, including many C-extension / PyArrow objects where module may be missing or misleading.
ResponseSerialized
dataclass
¶
Bases: HttpSerialized
Serialize a :class:~yggdrasil.io.response.Response as Arrow IPC.
module_and_name
staticmethod
¶
Return (module, qualname) for obj.
Robust across Python objects, including many C-extension / PyArrow objects where module may be missing or misleading.