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
Copy file name to clipboardExpand all lines: README.md
+17-10Lines changed: 17 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -20,14 +20,21 @@ To learn how to create the app from scratch, follow the IoT Starter tutorial.
20
20
To run the app, do the following:
21
21
22
22
1. If you haven't already, [create an InfluxDB Cloud account](https://www.influxdata.com/products/influxdb-cloud/) or [install InfluxDB OSS](https://www.influxdata.com/products/influxdb/).
23
-
2. Clone this repository to your machine.
24
-
3. Change to the directory--for example, enter the following code into the terminal:
23
+
2. Set up InfluxDB--the example app assumes you have the following:
24
+
25
+
- An InfluxDB [org ID](https://docs.influxdata.com/influxdb/v2/admin/organizations/view-orgs/)
26
+
- A [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/create-bucket/#create-a-bucket-using-the-influxdb-api) named `iot_center` for storing measurement data collected from devices
27
+
- A [bucket](https://docs.influxdata.com/influxdb/v2/admin/buckets/create-bucket/#create-a-bucket-using-the-influxdb-api) named `iot_center_devices` for storing device metadata and API token IDs
28
+
- An [API token](https://docs.influxdata.com/influxdb/v2/admin/tokens/create-token/) (for example, an **All Access token**) that has read and write permissions for the buckets
29
+
30
+
3. Clone this repository to your machine.
31
+
4. Change to the directory--for example, enter the following code into the terminal:
25
32
26
33
```bash
27
34
cd ./iot-api-python
28
35
```
29
36
30
-
4. Set environment variables for `INFLUX_TOKEN` and `INFLUX_ORG`--for example, enter the following commands into your terminal:
37
+
5. Set environment variables for `INFLUX_TOKEN` and `INFLUX_ORG`--for example, enter the following commands into your terminal:
31
38
32
39
```bash
33
40
export INFLUX_TOKEN=<INFLUX_TOKEN>
@@ -39,7 +46,7 @@ To run the app, do the following:
39
46
-**`<INFLUX_TOKEN>`**: your InfluxDB [API token](#authorization) with permission to query (_read_) buckets and create (_write_) authorizations for devices.
40
47
-**`<INFLUX_ORG_ID>`**: your InfluxDB organization ID.
41
48
42
-
5. If you need to adjust the defaults to match your InfluxDB instance, edit the settings in`./config.ini`:
49
+
6. If you need to adjust the defaults to match your InfluxDB instance, edit the settings in`./config.ini`:
43
50
44
51
```ini
45
52
[APP]
@@ -52,7 +59,7 @@ To run the app, do the following:
52
59
53
60
-**`<INFLUX_URL>`**: your InfluxDB instance URL--for example, the default OSS URL `http://localhost:8086`.
54
61
55
-
6. Create and activate a Python virtual environment for the project.
62
+
7. Create and activate a Python virtual environment for the project.
56
63
Enter the following commands into your terminal:
57
64
58
65
```bash
@@ -64,7 +71,7 @@ To run the app, do the following:
64
71
source virtualenv/bin/activate
65
72
```
66
73
67
-
7. Install `pdm` package manager for your system.
74
+
8. Install `pdm` package manager for your system.
68
75
On Linux or macOS, enter the following command into your terminal:
69
76
70
77
```bash
@@ -77,27 +84,27 @@ On Linux or macOS, enter the following command into your terminal:
0 commit comments