titanfe.apps.control_peer.brick module

A Brick

class titanfe.apps.control_peer.brick.BrickBaseDefinition(uid, name=None, family=None, logger=None, last_modified=None)[source]

Bases: object

The general definition of a brick contains it’s name and id, as well as the module itself and possibly a set of default parameters for that module read from the annexed config.yaml

create_virtual_env()[source]

create a virtual enviroment for the brick

guess_module_path()[source]

The module is expected to be found in the configured brick_folder extended with the brick-ID and should be either a folder or python file having the same name as the brick.

async install_or_update(update=True, force_update=False)[source]

Get a brick from the package manager and install it

property venv_path
class titanfe.apps.control_peer.brick.BrickInstanceDefinition(uid, name, ports: titanfe.apps.control_peer.brick.Ports, flow: titanfe.apps.control_peer.brick.Flow, base: titanfe.apps.control_peer.brick.BrickBaseDefinition, processing_parameters: dict, runtime_parameters: titanfe.apps.control_peer.brick.RuntimeParameters, connections: titanfe.apps.control_peer.brick.Connections)[source]

Bases: object

The Brick Instance Definition is a fully configured brick in a flow context. It should have it’s own name and uid within the flow, precise parameters and possibly connections to other bricks.

classmethod from_gridmanager(brick_description)[source]

Add brick configuration using default and flow-specific parameters if available

class titanfe.apps.control_peer.brick.Connections(input, output)

Bases: tuple

property input

Alias for field number 0

property output

Alias for field number 1

class titanfe.apps.control_peer.brick.EnvBuilder(logger, *args, **kwargs)[source]

Bases: venv.EnvBuilder

Builder for the virtual enviroments for each brick

install_pip(context)[source]

install pip manually

install_requirements(context)[source]

install requirements in virtual environment

log_stdout(pipe)[source]
post_setup(context)[source]

install platforma and brick requirements during setup of the virtual environment

class titanfe.apps.control_peer.brick.Flow(uid, name, schema)

Bases: tuple

property name

Alias for field number 1

property schema

Alias for field number 2

property uid

Alias for field number 0

class titanfe.apps.control_peer.brick.Ports(input, output)

Bases: tuple

property input

Alias for field number 0

property output

Alias for field number 1

class titanfe.apps.control_peer.brick.RuntimeParameters(autoscale_max_instances, autoscale_queue_level, exit_after_idle_seconds)

Bases: tuple

property autoscale_max_instances

Alias for field number 0

property autoscale_queue_level

Alias for field number 1

property exit_after_idle_seconds

Alias for field number 2

titanfe.apps.control_peer.brick.get_venv_exe(directory)[source]