volue-insight-timeseries 1.2.0__tar.gz → 1.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of volue-insight-timeseries might be problematic. Click here for more details.
- {volue-insight-timeseries-1.2.0/volue_insight_timeseries.egg-info → volue-insight-timeseries-1.2.1}/PKG-INFO +1 -1
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/README.md +71 -1
- volue-insight-timeseries-1.2.1/volue_insight_timeseries/VERSION +1 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries/util.py +1 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1/volue_insight_timeseries.egg-info}/PKG-INFO +1 -1
- volue-insight-timeseries-1.2.0/volue_insight_timeseries/VERSION +0 -1
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/LICENSE +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/MANIFEST.in +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/setup.cfg +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/setup.py +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries/__init__.py +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries/auth.py +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries/curves.py +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries/events.py +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries/session.py +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries.egg-info/SOURCES.txt +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries.egg-info/dependency_links.txt +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries.egg-info/requires.txt +0 -0
- {volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries.egg-info/top_level.txt +0 -0
|
@@ -58,10 +58,80 @@ make the switch.
|
|
|
58
58
|
* Use Pandas 1.5.0 or newer
|
|
59
59
|
* Use [zoneinfo](https://docs.python.org/3/library/zoneinfo.html), not pytz for handling time zone information
|
|
60
60
|
|
|
61
|
+
### Example of migrating an existing script
|
|
62
|
+
Assume you want to migrate the script below. It is a very simple script to
|
|
63
|
+
highlight things that are changing, not a recommended way to write production
|
|
64
|
+
code.
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
# python 3.9.8
|
|
68
|
+
# pip install wapi-python==0.7.15
|
|
69
|
+
# pip install python-dotenv==1.0.1
|
|
70
|
+
#
|
|
71
|
+
# ---
|
|
72
|
+
# .env file contents
|
|
73
|
+
# CLIENT_ID=your-client-id
|
|
74
|
+
# CLIENT_SECRET=your-client-secret
|
|
75
|
+
|
|
76
|
+
import os
|
|
77
|
+
import wapi
|
|
78
|
+
from wapi.util import TS
|
|
79
|
+
from wapi.curves import InstanceCurve
|
|
80
|
+
from dotenv import load_dotenv
|
|
81
|
+
|
|
82
|
+
load_dotenv()
|
|
83
|
+
session = wapi.Session(client_id=(os.environ['CLIENT_ID']),
|
|
84
|
+
client_secret=(os.environ['CLIENT_SECRET']))
|
|
85
|
+
|
|
86
|
+
results = session.search(name="tt no2 con ec00 °c cet min15 f")
|
|
87
|
+
if results:
|
|
88
|
+
instance_curve: InstanceCurve = results[0]
|
|
89
|
+
data: TS = instance_curve.get_latest(data_to="2030-04-01T04:00Z")
|
|
90
|
+
print(f"Curve type: {data.curve_type}")
|
|
91
|
+
print(f"Time zone class of curve data: {type(data.tz)}")
|
|
92
|
+
|
|
93
|
+
# Output
|
|
94
|
+
# Curve type: INSTANCES
|
|
95
|
+
# Time zone class of curve data: <class 'pytz.tzfile.CET'>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The migrated script is below
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
# python 3.9.8
|
|
102
|
+
# pip install volue-insight-timeseries==1.2.0
|
|
103
|
+
# pip install python-dotenv==1.0.1
|
|
104
|
+
#
|
|
105
|
+
# ---
|
|
106
|
+
# .env file contents
|
|
107
|
+
# CLIENT_ID=your-client-id
|
|
108
|
+
# CLIENT_SECRET=your-client-secret
|
|
109
|
+
|
|
110
|
+
import os
|
|
111
|
+
import volue_insight_timeseries as vit
|
|
112
|
+
from volue_insight_timeseries.util import TS
|
|
113
|
+
from volue_insight_timeseries.curves import InstanceCurve
|
|
114
|
+
from dotenv import load_dotenv
|
|
115
|
+
|
|
116
|
+
load_dotenv()
|
|
117
|
+
session = vit.Session(client_id=(os.environ['CLIENT_ID']),
|
|
118
|
+
client_secret=(os.environ['CLIENT_SECRET']))
|
|
119
|
+
|
|
120
|
+
results = session.search(name="tt no2 con ec00 °c cet min15 f")
|
|
121
|
+
if results:
|
|
122
|
+
instance_curve: InstanceCurve = results[0]
|
|
123
|
+
data: TS = instance_curve.get_latest(data_to="2030-04-01T04:00Z")
|
|
124
|
+
print(f"Curve type: {data.curve_type}")
|
|
125
|
+
print(f"Time zone class of curve data: {type(data.tz)}")
|
|
126
|
+
|
|
127
|
+
# Output
|
|
128
|
+
# Curve type: INSTANCES
|
|
129
|
+
# Time zone class of curve data: <class 'zoneinfo.ZoneInfo'>
|
|
130
|
+
```
|
|
61
131
|
|
|
62
132
|
## Copyright (MIT License)
|
|
63
133
|
|
|
64
|
-
Copyright (c) 2018-
|
|
134
|
+
Copyright (c) 2018-2024 Volue Insight AS
|
|
65
135
|
|
|
66
136
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
67
137
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.2.1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.2.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries/auth.py
RENAMED
|
File without changes
|
{volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries/curves.py
RENAMED
|
File without changes
|
{volue-insight-timeseries-1.2.0 → volue-insight-timeseries-1.2.1}/volue_insight_timeseries/events.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|