You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
clerie f60e3a3f89 Let data get expired. 7 months ago
iot_data Let data get expired. 7 months ago
LICENSE Initial commit 7 months ago Let data get expired. 7 months ago
requirements.txt Initial commit 7 months ago Initial commit 7 months ago

IOT Data

Just a tiny service for posting small datasets to a server which can get fetched by other services afterwards.

It just keeps the data in RAM so it is definetely not for big stuff and log term storages.


Read data:


Write data:

curl -X POST -d 'hello world!'' -H 'Content-Type: text/plain'

Content type is considered too:

curl -X POST -d '{"key": "value"}' -H 'Content-Type: application/json'

Check for the last data input with the Last-Modified header.


Init codebase

git clone
cd iot-data/
virtualenv -p python3 ENV
cd ..

Create config.json with the following contents and edit values for your needs:

  "sensor1": {
    "key": "asdf1234"
  "sensor2": {
    "key": "supersecret",
    "delete-after": 60

delete-after: Specifies the seconds after which the data gets discarded and no data is returned.

Starten und updaten lässt sich die Flask-App folgendermaßen:

cd iot-data/
git pull
source ENV/bin/activate
pip install -r requirements.txt
IOT_DATA_CONFIG=/path/to/config.json gunicorn iot_data:app