https://github.com/frequenz-floss/frequenz-client-dispatch-python
Dispatch API client for Python
https://github.com/frequenz-floss/frequenz-client-dispatch-python
api client dispatch frequenz lib library python
Last synced: about 1 year ago
JSON representation
Dispatch API client for Python
- Host: GitHub
- URL: https://github.com/frequenz-floss/frequenz-client-dispatch-python
- Owner: frequenz-floss
- License: mit
- Created: 2024-01-31T12:13:34.000Z (over 2 years ago)
- Default Branch: v0.x.x
- Last Pushed: 2024-11-28T12:38:27.000Z (over 1 year ago)
- Last Synced: 2024-11-28T13:28:53.106Z (over 1 year ago)
- Topics: api, client, dispatch, frequenz, lib, library, python
- Language: Python
- Homepage: https://frequenz-floss.github.io/frequenz-client-dispatch-python/
- Size: 1.81 MB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Frequenz Dispatch Client Library
[](https://github.com/frequenz-floss/frequenz-client-dispatch-python/actions/workflows/ci.yaml)
[](https://pypi.org/project/frequenz-client-dispatch/)
[](https://frequenz-floss.github.io/frequenz-client-dispatch-python/)
## 🚀 Introduction
Welcome to the **Frequenz Dispatch Client Library**—your go-to Python client for low-level interactions with the Frequenz Dispatch API!
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).
## 📦 Installation
Install the library via pip:
```bash
pip install frequenz-client-dispatch
```
## 🛠️ Usage
Here's a quick example to get you started:
```python
from frequenz.client.dispatch import Client
import asyncio
async def print_dispatches():
# Initialize the client
client = Client(key="your_api_key", server_url="grpc://fz-0004.frequenz.io")
# List all dispatches for a specific microgrid
async for page in client.list(microgrid_id=1):
for dispatch in page:
print(dispatch)
# Run the Example
asyncio.run(print_dispatches())
```
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).
## 🌐 Supported Platforms
We officially support and test the following platforms:
- **Python:** 3.11
- **Operating System:** Ubuntu Linux 20.04
- **Architectures:** amd64, arm64
## 🤝 Contributing
We welcome contributions! If you're interested in building or improving this project, please read our [Contributing Guide](CONTRIBUTING.md) to get started.