py2neo.wiring – Low-level network operations

Low-level module for network communication.

This module provides a convenience socket wrapper class (Wire) as well as classes for modelling IP addresses, based on tuples.

class py2neo.wiring.Address[source]

Address of a machine on a network.

family = None

Address family (AF_INET or AF_INET6)

exception py2neo.wiring.BrokenWireError[source]

Raised when a connection is broken by the network or remote peer.

class py2neo.wiring.IPv4Address[source]

Address subclass, specifically for IPv4 addresses.

class py2neo.wiring.IPv6Address[source]

Address subclass, specifically for IPv6 addresses.

class py2neo.wiring.Wire(s)[source]

Buffered socket wrapper for reading and writing bytes.


Flag indicating whether this connection has been closed remotely.


Close the connection.


Flag indicating whether this connection has been closed locally.


The local Address to which this connection is bound.

classmethod open(address, timeout=None, keep_alive=False)[source]

Open a connection to a given network Address.


Read bytes from the network.


The remote Address to which this connection is bound.

secure(verify=True, hostname=None)[source]

Apply a layer of security onto this connection.


Send the contents of the output buffer to the network.


Write bytes to the output buffer.

exception py2neo.wiring.WireError[source]

Raised when a connection error occurs.