Skip to content

Commit 64f2633

Browse files
authored
Enhance readme, add links, reformat (#100)
2 parents cf54baa + ee3009c commit 64f2633

File tree

2 files changed

+41
-12
lines changed

2 files changed

+41
-12
lines changed

README.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,54 @@
11
# Frequenz Dispatch Client Library
22

33
[![Build Status](https://github.com/frequenz-floss/frequenz-client-dispatch-python/actions/workflows/ci.yaml/badge.svg)](https://github.com/frequenz-floss/frequenz-client-dispatch-python/actions/workflows/ci.yaml)
4-
[![PyPI Package](https://img.shields.io/pypi/v/frequenz-client-dispatch)](https://pypi.org/project/frequenz-client-dispatch/)
5-
[![Docs](https://img.shields.io/badge/docs-latest-informational)](https://frequenz-floss.github.io/frequenz-client-dispatch-python/)
4+
[![PyPI Version](https://img.shields.io/pypi/v/frequenz-client-dispatch)](https://pypi.org/project/frequenz-client-dispatch/)
5+
[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen)](https://frequenz-floss.github.io/frequenz-client-dispatch-python/)
66

7-
## Introduction
7+
## 🚀 Introduction
88

9-
Dispatch API client for Python
9+
Welcome to the **Frequenz Dispatch Client Library**—your go-to Python client for low-level interactions with the Frequenz Dispatch API!
1010

11-
## Supported Platforms
11+
If you're a developer who needs direct access to the [Dispatch API](https://github.com/frequenz-floss/frequenz-dispatch-api) without the abstraction layers of the high-level client, you're in the right place. This library serves as the foundation for our more feature-rich and user-friendly [high-level client](https://github.com/frequenz-floss/frequenz-dispatch-python).
1212

13-
The following platforms are officially supported (tested):
13+
## 📦 Installation
14+
15+
Install the library via pip:
16+
17+
```bash
18+
pip install frequenz-client-dispatch
19+
```
20+
21+
## 🛠️ Usage
22+
23+
Here's a quick example to get you started:
24+
25+
```python
26+
from frequenz.client.dispatch import Client
27+
import asyncio
28+
29+
async def print_dispatches():
30+
# Initialize the client
31+
client = Client(key="your_api_key", server_url="grpc://fz-0004.frequenz.io")
32+
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())
40+
```
41+
42+
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).
43+
44+
## 🌐 Supported Platforms
45+
46+
We officially support and test the following platforms:
1447

1548
- **Python:** 3.11
1649
- **Operating System:** Ubuntu Linux 20.04
1750
- **Architectures:** amd64, arm64
1851

19-
## Contributing
52+
## 🤝 Contributing
2053

21-
If you want to know how to build this project and contribute to it, please
22-
check out the [Contributing Guide](CONTRIBUTING.md).
54+
We welcome contributions! If you're interested in building or improving this project, please read our [Contributing Guide](CONTRIBUTING.md) to get started.

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)