Skip to content

Commit

Permalink
docs: add installation and beta documentation in getting started
Browse files Browse the repository at this point in the history
  • Loading branch information
wyfo committed Sep 19, 2024
1 parent 19670de commit 5e989d8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions content/docs/getting-started/first-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ Let's get started!

## Pub/sub in Zenoh

First, let's write an application, `z_sensor.py` that will produce temperature measurements at each second:
First thing first, we need to install the [zenoh Python library](https://github.com/eclipse-zenoh/zenoh-python).
```bash
pip install eclipse-zenoh==1.0.0b2
```
*The examples are updated to use the 1.0 version currently in beta, which is why version must be specified in the installation command. You can find more information about the 1.0 changes in the [migration guides](https://zenoh.io/docs/migration_1.0/concepts/).*

Then, let's write an application, `z_sensor.py` that will produce temperature measurements at each second:

```python
import zenoh, random, time
Expand Down Expand Up @@ -56,11 +62,12 @@ if __name__ == "__main__":
time.sleep(60)
```

[Install](https://github.com/eclipse-zenoh/zenoh-python) the library and start the subscriber
Start the subscriber:
```bash
python3 z_subscriber.py
```
The subscriber waits for an update on `myhome/kitchen/temp`.
The subscriber waits for an update on `myhome/kitchen/temp`.

Now start `z_sensor.py` as follows
```bash
python3 z_sensor.py
Expand Down

0 comments on commit 5e989d8

Please sign in to comment.