ep-sdk-4pd 0.1.5__tar.gz → 0.1.6__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ep_sdk_4pd
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: 4paradigm Electricity Platform Service SDK Library for Python
5
5
  Home-page: https://gitlab.4pd.io/electricityproject/electricity-platform-sdk
6
6
  Author: 4paradigm Electricity Platform SDK
@@ -0,0 +1 @@
1
+ __version__ = '0.1.6'
@@ -21,8 +21,9 @@ class EpData:
21
21
  scope = None,
22
22
  days = 0
23
23
  ):
24
+ # 最晚时间为系统时间 D-2
24
25
  date_str = EpSystem.get_system_date(is_online=True)
25
- calculated_date = datetime.strptime(date_str, "%Y-%m-%d")
26
+ calculated_date = datetime.strptime(date_str, "%Y-%m-%d") - timedelta(days=2)
26
27
  system_date = calculated_date.strftime("%Y-%m-%d") # 转换回字符串
27
28
 
28
29
  request = HistoryDataRequest(
@@ -71,9 +72,8 @@ class EpData:
71
72
  def get_predict_data(
72
73
  scope
73
74
  ):
74
- # 最晚时间为系统时间 D-1
75
75
  date_str = EpSystem.get_system_date(is_online=True)
76
- calculated_date = datetime.strptime(date_str, "%Y-%m-%d") - timedelta(days=1)
76
+ calculated_date = datetime.strptime(date_str, "%Y-%m-%d")
77
77
  system_date = calculated_date.strftime("%Y-%m-%d") # 转换回字符串
78
78
 
79
79
  request = PredictDataRequest(
@@ -27,7 +27,7 @@ class HistoryDataRequest(BaseRequest):
27
27
  """
28
28
  Model for HistoryDataRequest
29
29
 
30
- 获取具体系统时间往前x天的数据
30
+ 获取具体系统时间往前x天的数据(最晚时间为系统时间 D-2)
31
31
  特别注意:get_history_data 或 get_predict_data 会get_system_date进行检测,不可获取system_date以后得数据,避免数据穿越现象
32
32
  """
33
33
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ep_sdk_4pd
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: 4paradigm Electricity Platform Service SDK Library for Python
5
5
  Home-page: https://gitlab.4pd.io/electricityproject/electricity-platform-sdk
6
6
  Author: 4paradigm Electricity Platform SDK
@@ -8,7 +8,7 @@ DESCRIPTION = '4paradigm Electricity Platform Service SDK Library for Python'
8
8
  AUTHOR = '4paradigm Electricity Platform SDK'
9
9
  AUTHOR_EMAIL = ''
10
10
  URL = 'https://gitlab.4pd.io/electricityproject/electricity-platform-sdk'
11
- VERSION = '0.1.5'
11
+ VERSION = '0.1.6'
12
12
  REQUIRES = ['requests']
13
13
 
14
14
  LONG_DESCRIPTION = ''
@@ -1 +0,0 @@
1
- __version__ = '0.1.5'
File without changes
File without changes