Skip to main content

Collect POST requests easily

Project description


logo

succulent - Collect POST requests easily


PyPI Version Documentation Status PyPI - Downloads Downloads GitHub repo size GitHub license GitHub commit activity Average time to resolve an issue Percentage of issues still open All Contributors AUR package Fedora package Packaging status DOI

  • Free software: MIT license
  • Documentation: https://succulent.readthedocs.io/en/latest/
  • Python versions: 3.8.x, 3.9.x, 3.10.x, 3.11.x, 3.12.x
  • Tested OS: Windows, Ubuntu, Fedora, Alpine, Arch, macOS. However, that does not mean it does not work on others

About :information_source:

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 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.

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 :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:

Detailed Insights :mag:

The current version of succulent comes packed with exciting features, including, but not limited to:

  • Hassle-free generation of request URLs for seamless data collection 🌐
  • Effortless data retrieval from POST requests 📥
  • Versatile data storage options, such as CSV, JSON, SQLite, and even images 🗂️📊🖼️
  • Customizable boundaries for collected data, allowing you to set minimum and maximum thresholds ⚙️

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! 💪📈

Installation

pip

Install succulent with pip:

pip install succulent

Alpine Linux

To install succulent on Alpine Linux, please use:

$ apk add py3-succulent

Arch Linux

To install succulent on Arch Linux, please use an AUR helper:

$ yay -Syyu python-succulent

Fedora Linux

To install succulent on Fedora, use:

$ dnf install python3-succulent

Container

Basic container for succulent

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

Data collection

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)

To collect images, create a file named configuration.yml in the root directory and define the following:

data:
  - key: # Key in POST request

To access the URL for data collection, send a GET request or navigate to http://localhost:8080/measure.

Data access

To access data via the Succulent API, enable the results in the configuration file:

results:
  enabled: true # false by default

To access the collected data, send a GET request or navigate to http://localhost:8080/data.

Data export

To export the data, enable the export in the configuration file:

results:
  export:
    enabled: true # false by default

To export the data, send a GET request or navigate to http://localhost:8080/export.

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
Tadej Lahovnik

💻 🐛 🤔 📖
Ayan Das
Ayan Das

💻 ⚠️
Iztok Fister Jr.
Iztok Fister Jr.

💻 🤔 🧑‍🏫
Oromion
Oromion

🐛 📦
rhododendrom
rhododendrom

🎨
Zala Lahovnik
Zala Lahovnik

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

succulent-0.3.3.tar.gz (120.9 kB view hashes)

Uploaded Source

Built Distribution

succulent-0.3.3-py3-none-any.whl (117.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page