66
77## Introduction
88
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.
1013
11- See [ the documentation] ( https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch )
12- 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.
18+
19+ ## Supported Platforms
20+
21+ The following platforms are officially supported (tested):
22+
23+ - ** Python:** 3.11
24+ - ** Operating System:** Ubuntu Linux 20.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 >= 0.10.1, < 0.11" ,
45+ ]
46+ ```
47+
48+ > [ !NOTE]
49+ > We recommend pinning the dependency to the latest version for programs,
50+ > like ` "frequenz-dispatch == 0.10.1" ` , and specifying a version range
51+ > spanning one major version for libraries, like
52+ > ` "frequenz-dispatch >= 0.10.1, < 0.11" ` . We follow [ semver] ( https://semver.org/ ) .
1353
1454## Quick Start
1555
@@ -18,7 +58,6 @@ with the dispatch API. Here's a minimal example to get you started:
1858
1959``` python
2060import os
21- from datetime import timedelta
2261from frequenz.dispatch import Dispatcher
2362
2463async def main ():
@@ -37,10 +76,6 @@ async def main():
3776 print (" Dispatcher ready!" )
3877```
3978
40- For complete examples and advanced usage, see the [ Usage] ( #usage ) section below.
41-
42- ## Usage
43-
4479The [ ` Dispatcher ` class] [ dispatcher-class ] , the main entry point for the API,
4580provides two channels:
4681
@@ -51,10 +86,6 @@ provides two channels:
5186 running status of the dispatch changed in a way that could potentially
5287 require the actor to start, stop or reconfigure itself.
5388
54- [ dispatcher-class ] : https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher
55- [ lifecycle-events ] : https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher.lifecycle_events
56- [ running-status-change ] : https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher.running_status_change
57-
5889### Example using the running status change channel
5990
6091``` python
@@ -92,40 +123,14 @@ async def run():
92123 await dispatcher
93124```
94125
95- ## Supported Platforms
96-
97- The following platforms are officially supported (tested):
98-
99- - ** Python:** 3.11
100- - ** Operating System:** Ubuntu Linux 20.04
101- - ** Architectures:** amd64, arm64
102-
103- ## Installation
104-
105- ### Using pip
106-
107- You can install the package from PyPI:
108-
109- ``` bash
110- python3 -m pip install frequenz-dispatch
111- ```
112-
113- ### Using pyproject.toml
126+ [ dispatcher-class ] : https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher
127+ [ lifecycle-events ] : https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher.lifecycle_events
128+ [ running-status-change ] : https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch/#frequenz.dispatch.Dispatcher.running_status_change
114129
115- Add the dependency to your ` pyproject.toml ` file:
130+ ## Documentation
116131
117- ``` toml
118- [project ]
119- dependencies = [
120- " frequenz-dispatch >= 0.10.1, < 0.11" ,
121- ]
122- ```
123-
124- > [ !NOTE]
125- > We recommend pinning the dependency to the latest version for programs,
126- > like ` "frequenz-dispatch == 0.10.1" ` , and specifying a version range
127- > spanning one major version for libraries, like
128- > ` "frequenz-dispatch >= 0.10.1, < 0.11" ` . We follow [ semver] ( https://semver.org/ ) .
132+ For complete API documentation, examples, and advanced usage patterns, see
133+ [ the documentation] ( https://frequenz-floss.github.io/frequenz-dispatch-python/v0.1/reference/frequenz/dispatch ) .
129134
130135## Contributing
131136
0 commit comments