Skip to content

Commit b57adab

Browse files
Export Client constants for external use (#83)
The API Client currently enforces constraints on price and quantity, such as bounds on their values and the number of allowed decimal places. This PR introduces the ability to export the constants defining these constraints, enabling applications using the API to reference them directly.
2 parents b8c5439 + d54ce6b commit b57adab

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* Add more edge cases to the integration tests.
1616
* Add idiomatic string representations for `Power` and `Price` classes.
1717
* Add support for timeouts in the gRPC function calls
18+
* Export Client constants for external use
1819

1920
## Bug Fixes
2021

src/frequenz/client/electricity_trading/__init__.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,14 @@ async def stream_trades():
179179
180180
"""
181181

182-
from ._client import Client
182+
from ._client import (
183+
MAX_PRICE,
184+
MIN_PRICE,
185+
MIN_QUANTITY_MW,
186+
PRECISION_DECIMAL_PRICE,
187+
PRECISION_DECIMAL_QUANTITY,
188+
Client,
189+
)
183190
from ._types import (
184191
Currency,
185192
DeliveryArea,
@@ -231,4 +238,9 @@ async def stream_trades():
231238
"StateReason",
232239
"Trade",
233240
"TradeState",
241+
"MAX_PRICE",
242+
"MIN_PRICE",
243+
"MIN_QUANTITY_MW",
244+
"PRECISION_DECIMAL_QUANTITY",
245+
"PRECISION_DECIMAL_PRICE",
234246
]

0 commit comments

Comments
 (0)