|
1 | 1 | # Frequenz Dispatch Client Library |
2 | 2 |
|
3 | 3 | [](https://github.com/frequenz-floss/frequenz-client-dispatch-python/actions/workflows/ci.yaml) |
4 | | -[](https://pypi.org/project/frequenz-client-dispatch/) |
5 | | -[](https://frequenz-floss.github.io/frequenz-client-dispatch-python/) |
| 4 | +[](https://pypi.org/project/frequenz-client-dispatch/) |
| 5 | +[](https://frequenz-floss.github.io/frequenz-client-dispatch-python/) |
6 | 6 |
|
7 | | -## Introduction |
| 7 | +## 🚀 Introduction |
8 | 8 |
|
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! |
10 | 10 |
|
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). |
12 | 12 |
|
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: |
14 | 47 |
|
15 | 48 | - **Python:** 3.11 |
16 | 49 | - **Operating System:** Ubuntu Linux 20.04 |
17 | 50 | - **Architectures:** amd64, arm64 |
18 | 51 |
|
19 | | -## Contributing |
| 52 | +## 🤝 Contributing |
20 | 53 |
|
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. |
0 commit comments