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 (#221)
Improves the README based on the suggestions in #166:
- 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
This is a corrected version of #176 targeting v1.x.x with updated API
usage.
Fixes#166
Supersedes #176
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 methods 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.13
24
+
-**Operating System:** Ubuntu Linux 24.04
25
+
-**Architectures:** amd64, arm64
14
26
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:
27
+
## Installation
16
28
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.
29
+
### Using pip
19
30
20
-
### Example using the running status change channel
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 with lifecycle events:
57
+
58
+
```python
59
+
import asyncio
60
+
import os
61
+
62
+
from frequenz.dispatch import Created, Deleted, Dispatcher, Updated
0 commit comments