In [2]:
import simcity

Getting and modifying a task

Tasks can be retrieved with get_task. To make a new task, use add_task. If a task needs to be written back to the database, use the global task database.


In [19]:
task = simcity.get_task('task_small_matsim_0.3')

In [14]:
task.id


Out[14]:
'task_small_matsim_0.3'

In [15]:
task.rev


Out[15]:
'44-2bc8aaffe4480dd3dc15be823a0bd387'

Getting or setting the configuration

By default, configuration is retrieved from ~/.simcity_client, config.ini, or ../config.ini. A custom configuration can also be made.


In [5]:
cfg = simcity.get_config()
cfg.add_section('mysection', {'a': 3})
cfg.section('mysection')
simcity.init(cfg)