alter_ego.exports package

Submodules

alter_ego.exports.otree module

class alter_ego.exports.otree.Assigner(assignees: List[Any], key: str, metadata: Dict[str, Any] | None = None)[source]

Bases: object

A class for attribute assignment operations.

set(value: Thread | Conversation) None[source]

Assign value to the ‘vars’ dictionary of all assignees.

unset() None[source]

Unset the key in all assignees.

alter_ego.exports.otree.add_hooks(thread: Thread) None[source]

Add history hooks to a thread.

alter_ego.exports.otree.html_history(thread: Thread) None[source]

Convert thread history to HTML format.

Create an Assigner object linked to the given instance.

Parameters:

instance – The instance to be linked.

Returns:

An Assigner object.

Raises:

NotImplementedError – If instance type is unsupported.

alter_ego.exports.otree.save(thread: Thread) None[source]

Save the thread data.

Module contents