Session

iota.session

This method start a new session of Iota. Once the session is loaded,

Classes

  • Session : class containing session object

  • Project : class containing project object

  • Scenario : class containing scenario object

Variables

  • projects (list[Project]) list of projects in the database

Methods

Start new session

Arguments

  • username: (str) username already registered in the database

  • config_file: (str) file path of the system configuration (e.g C:/Users/Stephen/ParicleAnalytics/config.ini)

Example

my_session = iota.session(
    'my_username',
    '$HOME/ParicleAnalytics/config.ini'
)

Create a project with a specified name and description See Project for more info

Arguments

  • name: (str) project name

  • description: (str) user description of the project (default: '')

Example

new_project = session.create_project(
    name = 'mixing optimization',
    description = 'Vary drum speed in the range 2 - 4 RPM'
)

Check the existence of a project by name

Arguments

  • name: (str) project name

Example

if session.exists_project(name = 'mixing_optimization'):
    print('project "mixing optimization" exist')

Return a project, specified by a name See Project for more info

Arguments

  • name: (str) project name

Example

project = session.get_project(
    name = 'mixing optimization'
)

Return the total number of projects for some user

Example

num_projects = session.total_projects()
print('total number of projects in the database is {}'.format(num_projects))

Last updated

Was this helpful?