module documentation

Undocumented

Exception InvalidFQPN The given FQPN was not a dot-separated list of Python objects.
Exception NoModule A prefix of the FQPN was not an importable module or package.
Exception NoObject A suffix of the FQPN was not an accessible object
Function findMachines Recursively yield MethodicalMachines and their FQPNs in and under the a Python object specified by an FQPN.
Function findMachinesViaWrapper Recursively yield MethodicalMachines and their FQPNs within a PythonModule or a twisted.python.modules.PythonAttribute wrapper object.
Function isOriginalLocation Attempt to discover if this appearance of a PythonAttribute representing a class refers to the module where that class was defined.
Function wrapFQPN Given an FQPN, retrieve the object via the global Python module namespace and wrap it with a PythonModule or a twisted.python.modules.PythonAttribute.
def findMachines(fqpn: str) -> Iterator[tuple[str, MethodicalMachine | TypeMachine[InputProtocol, Core]]]: (source)

Recursively yield MethodicalMachines and their FQPNs in and under the a Python object specified by an FQPN.

The discovery heuristic considers MethodicalMachine instances that are module-level attributes or class-level attributes accessible from module scope. Machines inside nested classes will be discovered, but those returned from functions or methods will not be.

Parameters
fqpn:stra fully-qualified Python identifier (i.e. the dotted identifier of an object defined at module or class scope, including the package and modele names); where to start the search.
Returns
Iterator[tuple[str, MethodicalMachine | TypeMachine[InputProtocol, Core]]]a generator which yields (FQPN, MethodicalMachine) pairs.
def findMachinesViaWrapper(within: PythonModule | PythonAttribute) -> Iterator[tuple[str, MethodicalMachine | TypeMachine[InputProtocol, Core]]]: (source)

Recursively yield MethodicalMachines and their FQPNs within a PythonModule or a twisted.python.modules.PythonAttribute wrapper object.

Note that PythonModules may refer to packages, as well.

The discovery heuristic considers MethodicalMachine instances that are module-level attributes or class-level attributes accessible from module scope. Machines inside nested classes will be discovered, but those returned from functions or methods will not be.

Parameters
within:PythonModule or twisted.python.modules.PythonAttributeWhere to start the search.
Returns
Iterator[tuple[str, MethodicalMachine | TypeMachine[InputProtocol, Core]]]a generator which yields FQPN, MethodicalMachine pairs.
def isOriginalLocation(attr: PythonAttribute | PythonModule) -> bool: (source)

Attempt to discover if this appearance of a PythonAttribute representing a class refers to the module where that class was defined.

def wrapFQPN(fqpn: str) -> PythonModule | PythonAttribute: (source)

Given an FQPN, retrieve the object via the global Python module namespace and wrap it with a PythonModule or a twisted.python.modules.PythonAttribute.