Skip to content

Commit 9d4b480

Browse files
committed
python 3.13
1 parent 7732daa commit 9d4b480

File tree

5 files changed

+56
-56
lines changed

5 files changed

+56
-56
lines changed

evdspy_tes_t.py

Lines changed: 0 additions & 22 deletions
This file was deleted.

example.py

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,22 @@
1-
import pandas as pd
21

3-
from evdspy import get_series, get_series_exp
2+
from evdspy import get_series, default_start_date_fnc, default_end_date_fnc
3+
import pandas as pd
4+
def get_api_key():
5+
import os
6+
return os.getenv("EVDS_API_KEY")
47

5-
template = """TP_GSYIH01_GY_CF
6-
TP_GSYIH02_GY_CF
7-
TP_GSYIH03_GY_CF
8-
TP_GSYIH04_GY_CF
9-
TP_GSYIH05_GY_CF
10-
TP_GSYIH06_GY_CF
11-
TP_GSYIH07_GY_CF
12-
TP_GSYIH08_GY_CF
13-
TP_GSYIH09_GY_CF
14-
TP_GSYIH10_GY_CF
15-
TP_GSYIH11_GY_CF
16-
TP_GSYIH14_GY_CF
17-
TP_GSYIH15_GY_CF
18-
TP_GSYIH16_GY_CF
19-
"""
8+
assert isinstance(get_api_key(), str) and len(get_api_key()) == 10
209

21-
# pandas dataframe
22-
df = get_series(template, cache=False)
23-
print(df)
24-
25-
# Result Class instance
26-
# .data : pd.DataFrame (data) e.g. result.data
27-
# .metadata : pd.DataFrame (metadata) e.g. result.metadata
28-
# .write() : Callable e.g. result.write("example.xlsx")
29-
result = get_series_exp(template, cache=False)
30-
31-
print(result) # Result
32-
print(result.data) # pd.DataFrame
33-
print(result.metadata) # pd.DataFrame
34-
35-
result.write("example.xlsx")
10+
def t1():
11+
df = get_series("TP.ODEMGZS.BDTTOPLAM",
12+
frequency="monthly",
13+
start_date=default_start_date_fnc(),
14+
end_date=default_end_date_fnc(),
15+
aggregation=("avg",),
16+
cache=False,
17+
debug=False,
18+
api_key=get_api_key())
19+
print(df)
20+
assert isinstance(df, pd.DataFrame)
21+
if __name__ == "__main__":
22+
t1()

main.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
1-
from evdspy import menu
2-
menu()
1+
import pandas as pd
2+
3+
from evdspy import get_series, get_series_exp
4+
5+
template = """TP_GSYIH01_GY_CF
6+
TP_GSYIH02_GY_CF
7+
TP_GSYIH03_GY_CF
8+
TP_GSYIH04_GY_CF
9+
TP_GSYIH05_GY_CF
10+
TP_GSYIH06_GY_CF
11+
TP_GSYIH07_GY_CF
12+
TP_GSYIH08_GY_CF
13+
TP_GSYIH09_GY_CF
14+
TP_GSYIH10_GY_CF
15+
TP_GSYIH11_GY_CF
16+
TP_GSYIH14_GY_CF
17+
TP_GSYIH15_GY_CF
18+
TP_GSYIH16_GY_CF
19+
"""
20+
21+
# pandas dataframe
22+
df = get_series(template, cache=False)
23+
print(df)
24+
25+
# Result Class instance
26+
# .data : pd.DataFrame (data) e.g. result.data
27+
# .metadata : pd.DataFrame (metadata) e.g. result.metadata
28+
# .write() : Callable e.g. result.write("example.xlsx")
29+
result = get_series_exp(template, cache=False)
30+
31+
print(result) # Result
32+
print(result.data) # pd.DataFrame
33+
print(result.metadata) # pd.DataFrame
34+
35+
result.write("example.xlsx")

main_t.py renamed to main_help.py

File renamed without changes.

main_menu.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from evdspy import menu
2+
menu()

0 commit comments

Comments
 (0)