pyarrow.SerializationContext

class pyarrow.SerializationContext

Bases: pyarrow.lib._Weakrefable

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

clone(self)

Return copy of this SerializationContext.

deserialize(self, what)

Call pyarrow.deserialize and pass this SerializationContext.

deserialize_components(self, what)

Call pyarrow.deserialize_components and pass this SerializationContext.

register_type(self, type_, type_id[, ...])

EXPERIMENTAL: Add type to the list of types we can serialize.

serialize(self, obj)

Call pyarrow.serialize and pass this SerializationContext.

serialize_to(self, value, sink)

Call pyarrow.serialize_to and pass this SerializationContext.

set_pickle(self, serializer, deserializer)

Set the serializer and deserializer to use for objects that are to be pickled.

clone(self)

Return copy of this SerializationContext.

Returns
cloneSerializationContext
deserialize(self, what)

Call pyarrow.deserialize and pass this SerializationContext.

deserialize_components(self, what)

Call pyarrow.deserialize_components and pass this SerializationContext.

register_type(self, type_, type_id, pickle=False, custom_serializer=None, custom_deserializer=None)

EXPERIMENTAL: Add type to the list of types we can serialize.

Parameters
type_type

The type that we can serialize.

type_idstr

A string used to identify the type.

picklebool

True if the serialization should be done with pickle. False if it should be done efficiently with Arrow.

custom_serializercallable()

This argument is optional, but can be provided to serialize objects of the class in a particular way.

custom_deserializercallable()

This argument is optional, but can be provided to deserialize objects of the class in a particular way.

serialize(self, obj)

Call pyarrow.serialize and pass this SerializationContext.

serialize_to(self, value, sink)

Call pyarrow.serialize_to and pass this SerializationContext.

set_pickle(self, serializer, deserializer)

Set the serializer and deserializer to use for objects that are to be pickled.

Parameters
serializercallable()

The serializer to use (e.g., pickle.dumps or cloudpickle.dumps).

deserializercallable()

The deserializer to use (e.g., pickle.dumps or cloudpickle.dumps).