Network

exception nucypher.network.middleware.NotFound[source]
exception nucypher.network.middleware.UnexpectedResponse[source]
class nucypher.network.nodes.FleetStateTracker[source]

A representation of a fleet of NuCypher nodes.

state_template

alias of FleetState

class nucypher.network.nodes.Learner(domains: Set, network_middleware: nucypher.network.middleware.RestMiddleware = <nucypher.network.middleware.RestMiddleware object>, start_learning_now: bool = False, learn_on_same_thread: bool = False, known_nodes: tuple = None, seed_nodes: Tuple[tuple] = None, node_storage=None, save_metadata: bool = False, abort_on_learning_error: bool = False, lonely: bool = False)[source]

Any participant in the “learning loop” - a class inheriting from this one has the ability, synchronously or asynchronously, to learn about nodes in the network, verify some essential details about them, and store information about them for later use.

exception NotEnoughNodes[source]
exception NotEnoughTeachers[source]
exception UnresponsiveTeacher[source]
keep_learning_about_nodes()[source]

Continually learn about new nodes.

learn_from_teacher_node(eager=True)[source]

Sends a request to node_url to find out about known nodes.

load_seednodes(read_storages: bool = True, retry_attempts: int = 3)[source]

Engage known nodes from storages and pre-fetch hardcoded seednode certificates for node learning.

stop_learning_loop(reason=None)[source]

Only for tests at this point. Maybe some day for graceful shutdowns.

tracker_class

alias of FleetStateTracker

exception nucypher.network.protocols.SuspiciousActivity[source]

raised when an action appears to amount to malicious conduct.

class nucypher.network.server.TLSHostingPower(host: str, public_certificate=None, public_certificate_filepath=None, *args, **kwargs)[source]
exception NoHostingPower[source]
not_found_error

alias of TLSHostingPower.NoHostingPower