Collect POST requests easily
Project description
succulent - Collect POST requests easily
About
Sending sensor measurements, data, or GPS positions from embedded devices, microcontrollers, and smartwatches to the central server is sometimes complicated and tricky. Setting up the primary data collection scripts can be time-consuming (selecting a protocol, framework, API, testing it, etc.). Usually, scripts are written for a specific task; thus, they are not easily adaptive to other tasks. succulent is a pure Python framework that simplifies the configuration, management, collection, and preprocessing of data collected via POST requests. The inspiration for the framework comes from the practical data collection challenges in smart agriculture. The main idea of the framework was to speed up the process of configuring different collected parameters and providing several useful functions for data transformations. The framework allows users to configure the whole endpoint for data collection in several minutes and thus not spend time on server-side scripts.
Detailed insights
The current version includes (but is not limited to) the following functions:
- Request URL generation for data collection
- Data collection from POST requests
- Storing data in different formats (CSV, JSON, SQLite)
- Defining boundaries for collected data (min, max)
Installation
pip
Install succulent with pip:
pip install succulent
Alpine Linux
To install succulent on Alpine Linux, please use:
$ apk add py3-succulent
Container
Configuration
Follow the instructions in the configuration section to define the configuration file.
Installation
Build the container using Docker:
docker build -t succulent-container .
Alternatively, you can use docker-compose
:
docker compose build
Usage
Run the container using Docker:
docker run -p 8080:8080 succulent-container
Alternatively, you can use docker-compose
:
docker compose up
Usage
Example
from succulent.api import SucculentAPI
api = SucculentAPI(host='0.0.0.0', port=8080, config='configuration.yml', format='csv')
api.start()
Configuration
In the root directory, create a file named configuration.yml
and define the following:
data:
- name: # Measure name
min: # Minimum value (optional)
max: # Maximum value (optional)
License
This package is distributed under the MIT License. This license can be found online at http://www.opensource.org/licenses/MIT.
Disclaimer
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!
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Tadej Lahovnik 💻 🐛 🤔 📖 |
Ayan Das 💻 ⚠️ |
Iztok Fister Jr. 💻 🤔 🧑🏫 |
Oromion 🐛 📦 |
rhododendrom 🎨 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for succulent-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c4470256222bb5b044b944a17656fcdbb59d37cec248dfe3e29fbbbf072a2fa |
|
MD5 | 54ed91bb36088c3004bd34caf13e6666 |
|
BLAKE2b-256 | 4d5ec6277787b588207bf48a92b695eea55c8e64074d7a2e5e4e5ab4e6b43a6a |