emod_api.campaign module¶
You use this simple campaign builder by importing it, adding valid events via “add”, and writing it out with “save”.
- emod_api.campaign.set_schema(schema_path_in)[source]¶
Set the (path to) the schema file. And reset all campaign variables. This is essentially a “start_building_campaign” function. :param schema_path_in. The path to a schema.json.:
- Returns
N/A.
- emod_api.campaign.add(event, name=None, first=False)[source]¶
Add a complete campaign event to the campaign builder. The new event is assumed to be a Python dict, and a valid event. The new event is not validated here. Set the first flag to True if this is the first event in a campaign because it functions as an accumulator and in some situations like sweeps it might have been used recently.
- emod_api.campaign.get_recv_trigger(trigger, old=False)[source]¶
Get the correct representation of a trigger (also called signal or even event) that is being listened to.