Getting started
This section demonstrates the usage of the succulent framework.
Installation
pip
To install succulent with pip, use:
pip install succulent
Alpine Linux
To install succulent on Alpine Linux, use:
$ apk add py3-succulent
Arch Linux
To install succulent on Arch Linux, use an AUR helper:
$ yay -Syyu python-succulent
Fedora Linux
To install succulent on Fedora, use:
$ dnf install python3-succulent
Usage
Example
from succulent.api import SucculentAPI
api = SucculentAPI(host='0.0.0.0', port=8080, config='configuration.yml', format='csv')
api.start()
Configuration
Data collection
In the root directory, create a configuration.yml file and define the following:
data:
- name: # Measure name
min: # Minimum value (optional)
max: # Maximum value (optional)
To collect images, create a configuration.yml file in the root directory and define the following:
data:
- key: # Key in POST request
To store data collection timestamps, define the following setting in the configuration.yml file in the root directory:
timestamp: true # false by default
To access the URL for data collection, send a GET request (or navigate) to http://localhost:8080/measure.
To restrict access to the collected data, define the following setting in the configuration.yml file in the root directory:
password: 'password' # Password for data access
To store data using a password, append the password parameter to the request URL: ?password=password.
Data access
To access data via the Succulent API, define the following setting in the configuration.yml file in the root directory:
results:
- enable: true # false by default
To access the collected data, send a GET request (or navigate) to http://localhost:8080/data. To access password-protected data, append the password parameter to the request URL: ?password=password.
Data export
To export the data, enable the export option in the configuration file:
export:
- enable: true # false by default
To export the data, send a GET request (or navigate) to http://localhost:8080/export. To export password-protected data, append the password parameter to the request URL: ?password=password. The data will be downloaded in the format specified in the configuration file.