tyba-client 0.4.2__tar.gz → 0.4.3__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 tyba-client might be problematic. Click here for more details.
- {tyba_client-0.4.2 → tyba_client-0.4.3}/PKG-INFO +1 -1
- {tyba_client-0.4.2 → tyba_client-0.4.3}/pyproject.toml +1 -1
- {tyba_client-0.4.2 → tyba_client-0.4.3}/tyba_client/client.py +22 -7
- {tyba_client-0.4.2 → tyba_client-0.4.3}/LICENSE +0 -0
- {tyba_client-0.4.2 → tyba_client-0.4.3}/README.md +0 -0
- {tyba_client-0.4.2 → tyba_client-0.4.3}/tyba_client/__init__.py +0 -0
- {tyba_client-0.4.2 → tyba_client-0.4.3}/tyba_client/forecast.py +0 -0
- {tyba_client-0.4.2 → tyba_client-0.4.3}/tyba_client/io.py +0 -0
- {tyba_client-0.4.2 → tyba_client-0.4.3}/tyba_client/models.py +0 -0
- {tyba_client-0.4.2 → tyba_client-0.4.3}/tyba_client/solar_resource.py +0 -0
- {tyba_client-0.4.2 → tyba_client-0.4.3}/tyba_client/utils.py +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import pandas as pd
|
|
2
|
+
import typing as t
|
|
2
3
|
from requests import Response
|
|
3
4
|
|
|
4
5
|
from tyba_client.models import GenerationModel, PVStorageModel, StandaloneStorageModel
|
|
@@ -16,11 +17,11 @@ logger = get_logger()
|
|
|
16
17
|
class Ancillary(object):
|
|
17
18
|
"""_"""
|
|
18
19
|
|
|
19
|
-
def __init__(self,
|
|
20
|
-
self.
|
|
20
|
+
def __init__(self, services):
|
|
21
|
+
self.services = services
|
|
21
22
|
|
|
22
23
|
def get(self, route, params=None):
|
|
23
|
-
return self.
|
|
24
|
+
return self.services.get(f"ancillary/{route}", params=params)
|
|
24
25
|
|
|
25
26
|
def get_pricing_regions(self, *, iso, service, market):
|
|
26
27
|
"""_"""
|
|
@@ -44,11 +45,15 @@ class Ancillary(object):
|
|
|
44
45
|
class LMP(object):
|
|
45
46
|
"""_"""
|
|
46
47
|
|
|
47
|
-
def __init__(self,
|
|
48
|
-
self.
|
|
48
|
+
def __init__(self, services):
|
|
49
|
+
self.services = services
|
|
50
|
+
self._route_base = "lmp"
|
|
49
51
|
|
|
50
52
|
def get(self, route, params=None):
|
|
51
|
-
return self.
|
|
53
|
+
return self.services.get(f"{self._route_base}/{route}", params=params)
|
|
54
|
+
|
|
55
|
+
def post(self, route, json):
|
|
56
|
+
return self.services.post(f"{self._route_base}/{route}", json=json)
|
|
52
57
|
|
|
53
58
|
def get_all_nodes(self, *, iso):
|
|
54
59
|
"""_"""
|
|
@@ -66,6 +71,12 @@ class LMP(object):
|
|
|
66
71
|
},
|
|
67
72
|
)
|
|
68
73
|
|
|
74
|
+
def search_nodes(self, location: t.Optional[str] = None, node_name_filter: t.Optional[str] = None, iso_override: t.Optional[str] = None):
|
|
75
|
+
return self.get(route="search-nodes",
|
|
76
|
+
params={"location": location,
|
|
77
|
+
"node_name_filter": node_name_filter,
|
|
78
|
+
"iso_override": iso_override})
|
|
79
|
+
|
|
69
80
|
|
|
70
81
|
class Services(object):
|
|
71
82
|
"""_"""
|
|
@@ -74,9 +85,13 @@ class Services(object):
|
|
|
74
85
|
self.client = client
|
|
75
86
|
self.ancillary = Ancillary(self)
|
|
76
87
|
self.lmp = LMP(self)
|
|
88
|
+
self._route_base = "services"
|
|
77
89
|
|
|
78
90
|
def get(self, route, params=None):
|
|
79
|
-
return self.client.get(f"
|
|
91
|
+
return self.client.get(f"{self._route_base}/{route}", params=params)
|
|
92
|
+
|
|
93
|
+
def post(self, route, json):
|
|
94
|
+
return self.client.post(f"{self._route_base}/{route}", json=json)
|
|
80
95
|
|
|
81
96
|
def get_all_isos(self):
|
|
82
97
|
"""_"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|