Skip to content

Commit 70a060c

Browse files
committed
doc: Timestamp
Timestamp storage, new configuration settings closes #48
1 parent 499c41a commit 70a060c

File tree

2 files changed

+84
-16
lines changed

2 files changed

+84
-16
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ To install `succulent` with pip, use:
9292
```sh
9393
pip install succulent
9494
```
95+
9596
### Alpine Linux
9697

9798
To install `succulent` on Alpine Linux, use:
@@ -190,12 +191,17 @@ data:
190191
max: # Maximum value (optional)
191192
```
192193

193-
To collect images, create a ``configuration.yml`` file in the root directory and define the following:
194+
To collect images, create a `configuration.yml` file in the root directory and define the following:
194195
```yml
195196
data:
196197
- key: # Key in POST request
197198
```
198199

200+
To store data collection timestamps, create a `configuration.yml` file in the root directory and define the following:
201+
```yml
202+
timestamp: true # false by default
203+
```
204+
199205
To access the URL for data collection, send a GET request (or navigate) to [http://localhost:8080/measure](http://localhost:8080/measure).
200206

201207
### Data access

docs/getting_started.rst

Lines changed: 77 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,103 @@ This section demonstrates the usage of the succulent framework.
66
Installation
77
------------
88

9-
To install the succulent package, run the following command:
9+
pip
10+
~~~
11+
12+
To install ``succulent`` with pip, use:
1013

1114
.. code:: bash
1215
1316
pip install succulent
1417
18+
Alpine Linux
19+
~~~~~~~~~~~~
20+
21+
To install ``succulent`` on Alpine Linux, use:
22+
23+
.. code:: bash
24+
25+
$ apk add py3-succulent
26+
27+
Arch Linux
28+
~~~~~~~~~~
29+
30+
To install ``succulent`` on Arch Linux, use an `AUR helper <https://wiki.archlinux.org/title/AUR_helpers>`_:
31+
32+
.. code:: bash
33+
34+
$ yay -Syyu python-succulent
35+
36+
Fedora Linux
37+
38+
To install ``succulent`` on Fedora, use:
39+
40+
.. code:: bash
41+
42+
$ dnf install python3-succulent
43+
1544
Usage
1645
-----
1746

47+
Example
48+
~~~~~~~
49+
50+
.. code:: python
51+
52+
from succulent.api import SucculentAPI
53+
api = SucculentAPI(host='0.0.0.0', port=8080, config='configuration.yml', format='csv')
54+
api.start()
55+
1856
Configuration
19-
~~~~~~~~~~~~~
57+
-------------
58+
59+
Data collection
60+
~~~~~~~~~~~~~~~
2061

21-
In the root directory, create a file named ``configuration.yml`` and define the following:
62+
In the root directory, create a ``configuration.yml`` file and define the following:
2263

2364
.. code:: yaml
2465
2566
data:
26-
- name: # Measure name
27-
min: # Minimum value (optional)
28-
max: # Maximum value (optional)
67+
- name: # Measure name
68+
min: # Minimum value (optional)
69+
max: # Maximum value (optional)
2970
30-
To collect images, create a file named ``configuration.yml`` in the root directory and define the following:
71+
To collect images, create a ``configuration.yml`` file in the root directory and define the following:
3172

3273
.. code:: yaml
3374
3475
data:
35-
- key: # Key in POST request
76+
- key: # Key in POST request
3677
37-
To access the URL for data collection, send a GET request or navigate to http://localhost:8080/measure.
78+
To store data collection timestamps, create a `configuration.yml` file in the root directory and define the following:
3879

39-
Example
40-
~~~~~~~
80+
.. code:: yaml
4181
42-
.. code:: python
82+
timestamp: true # false by default
4383
44-
from succulent.api import SucculentAPI
45-
api = SucculentAPI(host='0.0.0.0', port=8080, config='configuration.yml', format='csv')
46-
api.start()
84+
To access the URL for data collection, send a GET request (or navigate) to `http://localhost:8080/measure <http://localhost:8080/measure>`_.
85+
86+
Data access
87+
~~~~~~~~~~~
88+
89+
To access data via the Succulent API, enable the results option in the configuration file:
90+
91+
.. code:: yaml
92+
93+
results:
94+
- enable: true # false by default
95+
96+
To access the collected data, send a GET request (or navigate) to `http://localhost:8080/data <http://localhost:8080/data>`_.
97+
98+
Data export
99+
~~~~~~~~~~~
100+
101+
To export the data, enable the export option in the configuration file:
102+
103+
.. code:: yaml
104+
105+
export:
106+
- enable: true # false by default
107+
108+
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.

0 commit comments

Comments
 (0)