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
[](http://isitmaintained.com/project/firefly-cpp/succulent"Average time to resolve an issue")
18
-
[](http://isitmaintained.com/project/firefly-cpp/succulent"Percentage of issues still open")
Do you ever find it challenging and tricky to send sensor measurements :straight_ruler:, data :bar_chart:, or GPS positions from embedded devices :iphone:, microcontrollers, and [smartwatches](https://github.com/firefly-cpp/AST-Monitor) to a central server? :satellite: Setting up the primary data collection scripts can be a time-consuming :hourglass_flowing_sand: process, involving selecting a protocol, framework, API, and testing them out. Moreover, these scripts are often tailored for specific tasks, making them difficult to adapt to different scenarios.
65
+
Do you ever find it challenging and tricky to send sensor measurements 📏, data 📊, or GPS positions from embedded devices 📱, microcontrollers, and [smartwatches](https://github.com/firefly-cpp/AST-Monitor) to a central server? 📡 Setting up the primary data collection scripts can be a time-consuming ⏳ process, involving selecting a protocol, framework, API, and testing them out. Moreover, these scripts are often tailored for specific tasks, making them difficult to adapt to different scenarios.
33
66
34
-
But fear not! Introducing succulent 🌵, a pure Python framework that simplifies the configuration, management, collection, and preprocessing of data collected via POST requests. This framework draws inspiration from real-world data collection challenges in [smart agriculture](https://github.com/firefly-cpp/smart-agriculture-datasets/tree/main/plant-monitoring-esp32):brain::herb:, specifically plant monitoring using ESP32 devices. The main goal behind succulent is to streamline the process of configuring various data parameters and provide a range of useful functions for data transformations. By leveraging succulent, you can set up your entire data collection endpoint within minutes, freeing you from the hassle of dealing with server-side scripts.:rocket::wrench:
67
+
But fear not! Introducing succulent 🌵, a pure Python framework that simplifies the configuration, management, collection, and preprocessing of data collected via POST requests. This framework draws inspiration from real-world data collection challenges in [smart agriculture](https://github.com/firefly-cpp/smart-agriculture-datasets/tree/main/plant-monitoring-esp32) 🧠🌿, specifically plant monitoring using ESP32 devices. The main goal behind succulent is to streamline the process of configuring various data parameters and provide a range of useful functions for data transformations. By leveraging succulent, you can set up your entire data collection endpoint within minutes, freeing you from the hassle of dealing with server-side scripts. 🚀🔧
***Tested OS:** Windows, Ubuntu, Fedora, Alpine, Arch, macOS. **However, that does not mean it does not work on others**
35
73
36
-
## Detailed Insights:mag:
74
+
## 🔍 Detailed Insights
37
75
38
76
The current version of succulent comes packed with exciting features, including, but not limited to:
39
77
40
78
-**Hassle-free generation of request URLs** for seamless data collection 🌐
41
79
-**Effortless data retrieval** from POST requests 📥
42
-
-**Versatile data storage options**, such as CSV, JSON, SQLite, XML and even images 🗂️📊🖼️
43
-
-**Customizable boundaries for collected data**, allowing you to set minimum and maximum thresholds ⚙️
80
+
-**Versatile data storage options**, such as CSV, JSON, SQLite, XML, and even images 🗂️📊🖼️
81
+
-**Customisable boundaries for collected data**, allowing you to set minimum and maximum thresholds ⚙️
44
82
45
83
With succulent, the process of collecting, managing, and preprocessing data becomes a breeze, empowering you to focus on what truly matters—gaining valuable insights from your embedded devices, microcontrollers, and smartwatches. ⌚ So why waste precious time? ⏳ Dive into the world of succulent and unlock the true potential of your data! 💪📈
46
84
47
-
## Installation
85
+
## 📦 Installation
48
86
49
87
### pip
50
88
51
-
Install succulent with pip:
89
+
To install `succulent` with pip, use:
52
90
53
91
```sh
54
92
pip install succulent
55
93
```
56
94
### Alpine Linux
57
95
58
-
To install succulent on Alpine Linux, please use:
96
+
To install `succulent` on Alpine Linux, use:
59
97
60
98
```sh
61
99
$ apk add py3-succulent
62
100
```
63
101
64
102
### Arch Linux
65
103
66
-
To install succulent on Arch Linux, please use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers):
104
+
To install `succulent` on Arch Linux, use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers):
67
105
68
106
```sh
69
107
$ yay -Syyu python-succulent
70
108
```
71
109
72
110
### Fedora Linux
73
111
74
-
To install succulent on Fedora, use:
112
+
To install `succulent` on Fedora, use:
75
113
76
114
```sh
77
115
$ dnf install python3-succulent
78
116
```
79
117
80
-
## Container
81
-
82
-
File: docker-compose.yml
118
+
## 🐳 Container
119
+
Create a `docker-compose.yml` file with the following content in the root directory:
Next create a `configuration.yml` file in the root directory. Here's an example of a configuration file:
138
+
139
+
```yml
102
140
data:
103
141
- name: 'temperature'
104
142
- name: 'humidity'
@@ -107,8 +145,11 @@ data:
107
145
- name: 'date'
108
146
```
109
147
110
-
File: run.py
111
-
```bash
148
+
More information regarding the configuration file and its settings can be found in the [configuration](#-configuration) section.
149
+
150
+
Then create a Python file named `run.py` with the following content in the root directory:
151
+
152
+
```python
112
153
from succulent.api import SucculentAPI
113
154
114
155
api = SucculentAPI(config='configuration.yml', format='csv')
@@ -117,23 +158,19 @@ api = SucculentAPI(config='configuration.yml', format='csv')
117
158
app = api.app
118
159
```
119
160
120
-
Build and run:
161
+
Once you have set up the configuration file and the Python file, build the Docker image with the following command:
162
+
121
163
```bash
122
164
docker compose build
123
165
```
124
166
125
-
### Usage
126
-
Run the container using Docker:
127
-
```bash
128
-
docker run -p 8080:8080 succulent-container
129
-
```
167
+
Finally, run the Docker container with the following command:
130
168
131
-
Alternatively, you can use ``docker-compose``:
132
169
```bash
133
170
docker compose up
134
171
```
135
172
136
-
## Usage
173
+
## 🚀 Usage
137
174
138
175
### Example
139
176
@@ -143,53 +180,51 @@ api = SucculentAPI(host='0.0.0.0', port=8080, config='configuration.yml', format
143
180
api.start()
144
181
```
145
182
146
-
## Configuration
183
+
## 🔧 Configuration
147
184
### Data collection
148
-
In the root directory, create a file named `configuration.yml` and define the following:
185
+
In the root directory, create a `configuration.yml` file and define the following:
149
186
```yml
150
187
data:
151
188
- name: # Measure name
152
-
min: # Minimum value (optional)
153
-
max: # Maximum value (optional)
189
+
min: # Minimum value (optional)
190
+
max: # Maximum value (optional)
154
191
```
155
192
156
-
To collect images, create a file named ``configuration.yml`` in the root directory and define the following:
193
+
To collect images, create a ``configuration.yml`` file in the root directory and define the following:
157
194
```yml
158
195
data:
159
196
- key: # Key in POST request
160
197
```
161
198
162
-
To access the URL for data collection, send a GET request or navigate to [http://localhost:8080/measure](http://localhost:8080/measure).
199
+
To access the URL for data collection, send a GET request (or navigate) to [http://localhost:8080/measure](http://localhost:8080/measure).
163
200
164
201
### Data access
165
-
To access data via the Succulent API, enable the results in the configuration file:
202
+
To access data via the Succulent API, enable the results option in the configuration file:
166
203
```yml
167
204
results:
168
205
- enable: true # false by default
169
206
```
170
207
171
-
To access the collected data, send a GET request or navigate to [http://localhost:8080/data](http://localhost:8080/data).
208
+
To access the collected data, send a GET request (or navigate) to [http://localhost:8080/data](http://localhost:8080/data).
172
209
173
210
### Data export
174
-
To export the data, enable the export in the configuration file:
211
+
To export the data, enable the export option in the configuration file:
175
212
```yml
176
213
results:
177
-
export:
178
-
enabled: true # false by default
214
+
- export: true # false by default
179
215
```
180
216
181
-
To export the data, send a GET request or navigate to [http://localhost:8080/export](http://localhost:8080/export).
182
-
217
+
To export the data, send a GET request (or navigate) to [http://localhost:8080/export](http://localhost:8080/export). The data will be downloaded in the format specified in the configuration file.
183
218
184
-
## License
219
+
## 🔑 License
185
220
186
221
This package is distributed under the MIT License. This license can be found online at <http://www.opensource.org/licenses/MIT>.
187
222
188
223
## Disclaimer
189
224
190
225
This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!
191
226
192
-
## Contributors ✨
227
+
## 🫂 Contributors
193
228
194
229
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
0 commit comments