Skip to content

Commit 65d62f6

Browse files
committed
feat: add demo_config.py
1 parent a1419a2 commit 65d62f6

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ API or building production workflows, these scripts will help you get started qu
2424
```bash
2525
easyssp-simulation-examples-python/
2626
├── demo.py # Run a basic scenario
27+
├── demo_config.py # User agent and easySSP username and password config.
2728
├── simulation_operations.py # Helper functions for polling simulation status, downloading results, etc.
2829
├── start_simulation_config_json.py # JSON representation of a start simulation configuration
2930
├── input/
@@ -71,8 +72,7 @@ uv sync
7172

7273
## 3. Provide your login credentials
7374

74-
In the `demo.py` file, replace `your_easyssp_username` and `your_easyssp_password` with your real easySSP credentials
75-
to start the demo.
75+
In the `demo_config.py` file, provide your easySSP credentials to start the demo.
7676

7777
---
7878

demo/demo.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@
1010
poll_status_until_finished,
1111
)
1212
from start_simulation_config_json import start_simulation_json_config
13-
14-
USER_AGENT = "easyssp-simulation-examples-python"
13+
from demo_config import USER_AGENT, EASYSSP_USERNAME, EASYSSP_PASSWORD
1514

1615
with (
1716
open("../input/simulation_example.ssp", "rb") as ssp_file,
1817
open("../input/exampleStimuli.csv", "rb") as stimuli_file
1918
):
2019
try:
21-
simulation_client = SimulationClient(username="your_easyssp_username", password="your_easyssp_password",
20+
simulation_client = SimulationClient(username=EASYSSP_USERNAME, password=EASYSSP_PASSWORD,
2221
user_agent=USER_AGENT)
2322

2423
# get simulation info and create start configuration

demo/demo_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
USER_AGENT = "easyssp-simulation-examples-python"
2+
EASYSSP_USERNAME = ""
3+
EASYSSP_PASSWORD = ""

0 commit comments

Comments
 (0)