Skip to content

Commit 59c18d8

Browse files
feat(sdk): Fix for tests for python sdk and environment variables for… (#80)
* feat(sdk): Fix for tests for python sdk and environment variables for examples Added changes for tests for python sdk. Fixed the username variables to get the username serial from the environment variables. * fix(sdk): fixed minor review comments Removed commented lines. Changed the assert type. * fix(sdk): Tests for Python SDK * feat(sdk): Fix tests for Python SDK
1 parent 35d0b70 commit 59c18d8

26 files changed

+180
-107
lines changed

examples/afi_optimizer_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
from urllib3 import Retry
1919

20-
host = "https://api.factset.com"
21-
username = "<username-serial>"
22-
password = "<apiKey>"
20+
host = os.environ['FACTSET_HOST']
21+
username = os.environ['FACTSET_USERNAME']
22+
password = os.environ['FACTSET_API_KEY']
2323

2424

2525
def main():

examples/axp_optimizer_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
from urllib3 import Retry
2121

22-
host = "https://api.factset.com"
23-
username = "<username-serial>"
24-
password = "<apiKey>"
22+
host = os.environ['FACTSET_HOST']
23+
username = os.environ['FACTSET_USERNAME']
24+
password = os.environ['FACTSET_API_KEY']
2525

2626

2727
def main():

examples/bpm_optimizer_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
from urllib3 import Retry
1919

20-
host = "https://api.factset.com"
21-
username = "<username-serial>"
22-
password = "<apiKey>"
20+
host = os.environ['FACTSET_HOST']
21+
username = os.environ['FACTSET_USERNAME']
22+
password = os.environ['FACTSET_API_KEY']
2323

2424

2525
def main():

examples/fi_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
from urllib3 import Retry
1818

19-
host = "https://api.factset.com"
20-
username = "<username-serial>"
21-
password = "<apiKey>"
19+
host = os.environ['FACTSET_HOST']
20+
username = os.environ['FACTSET_USERNAME']
21+
password = os.environ['FACTSET_API_KEY']
2222

2323

2424
def main():

examples/fpo_optimizer_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

2121
from urllib3 import Retry
2222

23-
host = "https://api.factset.com"
24-
username = "<username-serial>"
25-
password = "<apiKey>"
23+
host = os.environ['FACTSET_HOST']
24+
username = os.environ['FACTSET_USERNAME']
25+
password = os.environ['FACTSET_API_KEY']
2626

2727

2828
def main():

examples/pa_engine_multiple_unit_example.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818

1919
from urllib3 import Retry
2020

21-
host = "https://api.factset.com"
22-
username = "<username-serial>"
23-
password = "<apiKey>"
24-
21+
host = os.environ['FACTSET_HOST']
22+
username = os.environ['FACTSET_USERNAME']
23+
password = os.environ['FACTSET_API_KEY']
2524

2625
def main():
2726
config = Configuration()

examples/pa_engine_single_unit_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
from urllib3 import Retry
2020

21-
host = "https://api.factset.com"
22-
username = "<username-serial>"
23-
password = "<apiKey>"
21+
host = os.environ['FACTSET_HOST']
22+
username = os.environ['FACTSET_USERNAME']
23+
password = os.environ['FACTSET_API_KEY']
2424

2525
def main():
2626
config = Configuration()

examples/pub_engine_multiple_unit_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
from urllib3 import Retry
1414
from pathlib import Path
1515

16-
host = "https://api.factset.com"
17-
username = "<username-serial>"
18-
password = "<apiKey>"
16+
host = os.environ['FACTSET_HOST']
17+
username = os.environ['FACTSET_USERNAME']
18+
password = os.environ['FACTSET_API_KEY']
1919

2020

2121
def main():

examples/pub_engine_single_unit_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
from urllib3 import Retry
1515

16-
host = "https://api.factset.com"
17-
username = "<username-serial>"
18-
password = "<apiKey>"
16+
host = os.environ['FACTSET_HOST']
17+
username = os.environ['FACTSET_USERNAME']
18+
password = os.environ['FACTSET_API_KEY']
1919

2020

2121
def main():

examples/quant_engine_single_unit_feather_example_basic.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
from urllib3 import Retry
1919

20-
host = "https://api.factset.com"
21-
username = "<username-serial>"
22-
password = "<apiKey>"
20+
host = os.environ['FACTSET_HOST']
21+
username = os.environ['FACTSET_USERNAME']
22+
password = os.environ['FACTSET_API_KEY']
2323

2424

2525
def main():

0 commit comments

Comments
 (0)