Skip to main content

CSV-MQTT

A CSV to MQTT connector. Reads data from csv file and pushes it to a MQTT Broker.

Many a times, we want to read a particular .csv file and then form a MQTT payload to publish it to cloud. ( Probably when working in IoT).

So the project as always came in due to a necessity. The idea is simple. The process will read the .csv file wherein the very first row contains the columns headers. ( Please add column headers before using the code or be ready to see something strange.) Then the same column headers are treated as Keys and the corresponding row values as Values in a JSON object while forming a MQTT Payload.

For example, If the .csv has column headers as, Name, Age and School

Then the resulting MQTT Payload will be of the form,

{ "Name" : "dummy_name", "Age" : "dummy_value", "School" : "dummy_school" }

One can install the package using pip

pip3 install csv-mqtt

Once installed, they can use the package by using the import

from csv_mqtt.csv_mqtt import CsvMqtt

The CsvMqtt can be used to create objects for creating a pipeline for csv-mqtt.

For examples, one can check the example directory in the project.

Release files for csv-mqtt 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for csv-mqtt 1.0.2
File Size Uploaded
csv-mqtt-1.0.2.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for csv-mqtt 1.0.2
File Interpreter ABI Platform
csv_mqtt-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / csv-mqtt-1.0.2.tar.gz

Download URL csv-mqtt-1.0.2.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d423e7086d3a52c13e2ec320ffde702dd32ef130385d69d2aabf4b62e0d4c094
BLAKE2b-256 checksum
How to use checksums
10fa17f208c69e31c80eef8c94c416fe21687c7f0f4c8610ffb0f3c793c15575
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.8

Release files / csv_mqtt-1.0.2-py3-none-any.whl

Download URL csv_mqtt-1.0.2-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82ee5e201ebf79e060b3a5067d30c461a9dce043be9e1fb8fad046c7c1f80751
BLAKE2b-256 checksum
How to use checksums
0ba1e8ab39c43e53229d199c91b2a1a0398b8b1da7cac066042d8baeb3fe5c65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page