syft.core.io.location.location

Classes

Location([name])

This represents the location of a node, including location-relevant metadata (such as how long it takes for us to communicate with this location, etc.)

class syft.core.io.location.location.Location(name=None)[source]

Bases: syft.core.common.serde.serializable.Serializable

This represents the location of a node, including location-relevant metadata (such as how long it takes for us to communicate with this location, etc.)

repr_short()[source]

Returns a SHORT human-readable version of the ID

Return a SHORT human-readable version of the ID which makes it print nicer when embedded (often alongside other UID objects) within other object __repr__ methods.

static get_protobuf_schema()[source]

Return the type of protobuf object which stores a class of this type

As a part of serialization and deserialization, we need the ability to lookup the protobuf object type directly from the object type. This static method allows us to do this.

Importantly, this method is also used to create the reverse lookup ability within the metaclass of Serializable. In the metaclass, it calls this method and then it takes whatever type is returned from this method and adds an attribute to it with the type of this class attached to it. See the MetaSerializable class for details.

Returns

the type of protobuf object which corresponds to this class.

Return type

GeneratedProtocolMessageType