Skip to content

Commit ee3009c

Browse files
committed
Update documentation
Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent f45430d commit ee3009c

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@ Here's a quick example to get you started:
2424

2525
```python
2626
from frequenz.client.dispatch import Client
27+
import asyncio
2728

28-
# Initialize the client
29-
client = Client(key="your_api_key", server_url="grpc://fz-0004.frequenz.io")
29+
async def print_dispatches():
30+
# Initialize the client
31+
client = Client(key="your_api_key", server_url="grpc://fz-0004.frequenz.io")
3032

31-
# List all dispatches for a specific microgrid
32-
async for page in client.list(microgrid_id=1):
33-
for dispatch in page:
34-
print(dispatch)
33+
# List all dispatches for a specific microgrid
34+
async for page in client.list(microgrid_id=1):
35+
for dispatch in page:
36+
print(dispatch)
37+
38+
# Run the Example
39+
asyncio.run(print_dispatches())
3540
```
3641

3742
For detailed usage and advanced features, check out the [client documentation](https://frequenz-floss.github.io/frequenz-client-dispatch-python/latest/reference/frequenz/client/dispatch/#frequenz.client.dispatch.Client).

src/frequenz/client/dispatch/_client.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ async def create( # pylint: disable=too-many-positional-arguments
249249
) -> Dispatch:
250250
"""Create a dispatch.
251251
252-
Will try to return the created dispatch, identifying it by
253-
the same fields as the request.
254-
255252
Args:
256253
microgrid_id: The microgrid_id to create the dispatch for.
257254
type: User defined string to identify the dispatch type.

0 commit comments

Comments
 (0)