You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve README.md for better project discoverability
- Add expanded introduction describing the library purpose
- Add Installation section with pip and pyproject.toml examples
- Add Quick Start section with minimal working example
- Move Supported Platforms section before Installation
- Update documentation links to use /latest/ instead of /v0.1/
- Fix long lines using reference-style links
- Update Ubuntu version to 24.04
- Update version references to v1.0.1
Fixes#166
Signed-off-by: Mathias L. Baumann <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+91-18Lines changed: 91 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,87 @@
6
6
7
7
## Introduction
8
8
9
-
A highlevel interface for the dispatch API.
9
+
The `frequenz-dispatch` library provides a high-level Python interface for
10
+
interacting with the Frequenz Dispatch API. This library enables you to
11
+
manage and monitor dispatch operations in microgrids, including lifecycle
12
+
events and running status changes of dispatch operations.
10
13
11
-
See [the documentation](https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch) for more information.
14
+
The main entry point is the [`Dispatcher`][dispatcher-class] class, which
15
+
provides channels for receiving dispatch lifecycle events and running status
16
+
updates, allowing you to build reactive applications that respond to dispatch
17
+
state changes.
12
18
13
-
## Usage
19
+
## Supported Platforms
20
+
21
+
The following platforms are officially supported (tested):
22
+
23
+
-**Python:** 3.11, 3.12
24
+
-**Operating System:** Ubuntu Linux 24.04
25
+
-**Architectures:** amd64, arm64
26
+
27
+
## Installation
28
+
29
+
### Using pip
30
+
31
+
You can install the package from PyPI:
32
+
33
+
```bash
34
+
python3 -m pip install frequenz-dispatch
35
+
```
36
+
37
+
### Using pyproject.toml
38
+
39
+
Add the dependency to your `pyproject.toml` file:
40
+
41
+
```toml
42
+
[project]
43
+
dependencies = [
44
+
"frequenz-dispatch >= 1.0.1, < 2",
45
+
]
46
+
```
47
+
48
+
> [!NOTE]
49
+
> We recommend pinning the dependency to the latest version for programs,
50
+
> like `"frequenz-dispatch == 1.0.1"`, and specifying a version range
51
+
> spanning one major version for libraries, like
52
+
> `"frequenz-dispatch >= 1.0.1, < 2"`. We follow [semver](https://semver.org/).
53
+
54
+
## Quick Start
55
+
56
+
Here's a minimal example to get you started:
14
57
15
-
The [`Dispatcher` class](https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher), the main entry point for the API, provides two channels:
58
+
```python
59
+
import asyncio
60
+
import os
16
61
17
-
*[Lifecycle events](https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher.lifecycle_events): A channel that sends a message whenever a [Dispatch][frequenz.dispatch.Dispatch] is created, updated or deleted.
18
-
*[Running status change](https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher.running_status_change): Sends a dispatch message whenever a dispatch is ready to be executed according to the schedule or the running status of the dispatch changed in a way that could potentially require the actor to start, stop or reconfigure itself.
62
+
from frequenz.dispatch import Dispatcher
19
63
20
-
### Example using the running status change channel
0 commit comments