from utils.rc.client.requests import Requests
from utils.rc.client.auth import AuthClient
from utils.rc.dtos.scenario import Scenario
import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
Requests.setRootHost("https://staging.dev.rapidcanvas.net/api/")
AuthClient.setToken() #you can find your token in RapidCanvas UI under tools/token
A scenario is created within a project and allows running a pipeline when certain conditions are met.
Shared variables are local to a scenario and can be used to execute a pipeline with the value of a defined shared variable.
Shared variables take priority over global variables.
scenario_1 = project.add_scenario(
name='scenario_1',
description='Scenario 1 example',
shared_variables=dict(variable1="variable_value")
)