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: docs/getting_started.rst
+77-15Lines changed: 77 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -6,41 +6,103 @@ This section demonstrates the usage of the succulent framework.
6
6
Installation
7
7
------------
8
8
9
-
To install the succulent package, run the following command:
9
+
pip
10
+
~~~
11
+
12
+
To install ``succulent`` with pip, use:
10
13
11
14
.. code:: bash
12
15
13
16
pip install succulent
14
17
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
+
15
44
Usage
16
45
-----
17
46
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
+
18
56
Configuration
19
-
~~~~~~~~~~~~~
57
+
-------------
58
+
59
+
Data collection
60
+
~~~~~~~~~~~~~~~
20
61
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:
22
63
23
64
.. code:: yaml
24
65
25
66
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)
29
70
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:
31
72
32
73
.. code:: yaml
33
74
34
75
data:
35
-
- key: # Key in POST request
76
+
- key: # Key in POST request
36
77
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:
38
79
39
-
Example
40
-
~~~~~~~
80
+
.. code:: yaml
41
81
42
-
.. code:: python
82
+
timestamp: true # false by default
43
83
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