tyba-client 0.4.1__py3-none-any.whl → 0.4.3__py3-none-any.whl

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/client.py CHANGED
@@ -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, prices):
20
- self.prices = prices
20
+ def __init__(self, services):
21
+ self.services = services
21
22
 
22
23
  def get(self, route, params=None):
23
- return self.prices.get(f"ancillary/{route}", params=params)
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, prices):
48
- self.prices = prices
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.prices.get(f"lmp/{route}", params=params)
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"services/{route}", params=params)
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
  """_"""
tyba_client/models.py CHANGED
@@ -622,3 +622,4 @@ class AncillaryService:
622
622
  REGULATION_UP = "Regulation Up"
623
623
  REGULATION_DOWN = "Regulation Down"
624
624
  RESERVES = "Reserves"
625
+ ECRS = "ECRS"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tyba-client
3
- Version: 0.4.1
3
+ Version: 0.4.3
4
4
  Summary: A Python API client for the Tyba Public API
5
5
  License: MIT
6
6
  Author: Tyler Nisonoff
@@ -1,12 +1,12 @@
1
1
  LICENSE,sha256=LbMfEdjEK-IRzvCfdEBhn9UCANze0Rc7hWrQTEj_xvU,1079
2
2
  tyba_client/__init__.py,sha256=42STGor_9nKYXumfeV5tiyD_M8VdcddX7CEexmibPBk,22
3
- tyba_client/client.py,sha256=zEqlK-w4T02u8VKatIeJuBY8xDcDlTfko_9yJvBT64c,5761
3
+ tyba_client/client.py,sha256=KWUiHdP_hC0CJ2Uk5-E9hUfuEStDinM9KPXKgm_tCBw,6486
4
4
  tyba_client/forecast.py,sha256=lhzTewXZNqxOmuNuBmjw_NnikObqJSSu-yLFt7qSBSM,6377
5
5
  tyba_client/io.py,sha256=iyiQrpM1xg9XAoXlU6JvNB1uxRK77keJ8gAG-fefV2U,5783
6
- tyba_client/models.py,sha256=_ZhMOwbEknOhwyjrpedUT1r7r7J92-AAqkpGbZJaEVQ,17525
6
+ tyba_client/models.py,sha256=72ZXRHXzHt6SwPD82IFgKj66nsQVBI8ko1MrRASnRPo,17543
7
7
  tyba_client/solar_resource.py,sha256=oUD6-qUJhiIjrHbSzSL0X4asGgU4lRBocyy0MkA3keY,3379
8
8
  tyba_client/utils.py,sha256=n4tUBGlQIwxbLqJcQRiAIbIJA0DaLSjbAxakhukqaeE,876
9
- tyba_client-0.4.1.dist-info/LICENSE,sha256=LbMfEdjEK-IRzvCfdEBhn9UCANze0Rc7hWrQTEj_xvU,1079
10
- tyba_client-0.4.1.dist-info/METADATA,sha256=tARY9izCghh03klzoix8JNoKdSTwDqSllwIuayLZ6Ec,2292
11
- tyba_client-0.4.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
- tyba_client-0.4.1.dist-info/RECORD,,
9
+ tyba_client-0.4.3.dist-info/LICENSE,sha256=LbMfEdjEK-IRzvCfdEBhn9UCANze0Rc7hWrQTEj_xvU,1079
10
+ tyba_client-0.4.3.dist-info/METADATA,sha256=brc-EBEUemvLEKxTGnAmOg0XpZpcIO4aCnHM-35T-Vw,2292
11
+ tyba_client-0.4.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
12
+ tyba_client-0.4.3.dist-info/RECORD,,