syft.core.io.address

Classes

Address([name, network, domain, device, vm])

Unspecified()

class syft.core.io.address.Address(name=None, network=None, domain=None, device=None, vm=None)[source]

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

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

property network

This client points to a node, if that node lives within a network or is a network itself, this property will return the ID of that network if it is known by the client.

property domain

This client points to a node, if that node lives within a domain or is a domain itself, this property will return the ID of that domain if it is known by the client.

property device

This client points to a node, if that node lives within a device or is a device itself, this property will return the ID of that device if it is known by the client.

property vm

This client points to a node, if that node lives within a vm or is a vm itself, this property will return the ID of that vm if it is known by the client.

property target_id

Return the address of the node which lives at this address.

Note that this id is simply the most granular id available to the address.