Namespace#

class tierkreis.core.signature.Namespace(functions: dict[str, ~tierkreis.core.protos.tierkreis.v1alpha1.signature.FunctionDeclaration], subspaces: dict[str, Namespace] = <factory>)[source]#

Bases: object

A namespace containing named functions and child namespaces.

Methods

all_namespaces

Return a list of all namespaces in the namespace tree, as a list of qualified names.

empty

Create an empty namespace.

from_proto

get

Get a child namespace by specifying the qualified namespace as a list of strings.

to_proto

Attributes

functions

subspaces

all_namespaces() list[list[str]][source]#

Return a list of all namespaces in the namespace tree, as a list of qualified names.

classmethod empty() Namespace[source]#

Create an empty namespace.

get(ns: list[str])[source]#

Get a child namespace by specifying the qualified namespace as a list of strings.