bellini.containers.Container

class bellini.containers.Container(solution=None, name=None, **values)[source]

Bases: object

Simple container for a solution

__init__(solution=None, name=None, **values)[source]

Methods

__init__([solution, name])

apply_law(law)

Apply law to the current Solution and return it in a new Container

observe(value[, key])

Observe a particular attribute of the contained Solution

receive_aliquot(solution)

Recieve an aliquot and return the new Container with aliquot added

retrieve_aliquot(volume)

Removes an aliquot and returns it as well as the new Container with the aliquot removed

Attributes

name

volume

The volume of the current solution

apply_law(law)[source]

Apply law to the current Solution and return it in a new Container

observe(value, key=None)[source]

Observe a particular attribute of the contained Solution

receive_aliquot(solution)[source]

Recieve an aliquot and return the new Container with aliquot added

retrieve_aliquot(volume)[source]

Removes an aliquot and returns it as well as the new Container with the aliquot removed

property volume

The volume of the current solution