Skip to main content

CSV parser meets MQTT Publisher

Project description

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.

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

csv-mqtt-1.0.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

csv_mqtt-1.0.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file csv-mqtt-1.0.2.tar.gz.

File metadata

  • Download URL: csv-mqtt-1.0.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for csv-mqtt-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d423e7086d3a52c13e2ec320ffde702dd32ef130385d69d2aabf4b62e0d4c094
MD5 8a2d639a07b7ca6989e77115f7ee87ed
BLAKE2b-256 10fa17f208c69e31c80eef8c94c416fe21687c7f0f4c8610ffb0f3c793c15575

See more details on using hashes here.

File details

Details for the file csv_mqtt-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: csv_mqtt-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for csv_mqtt-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 82ee5e201ebf79e060b3a5067d30c461a9dce043be9e1fb8fad046c7c1f80751
MD5 91315411d0bcf0b96b7fbe5529a8b703
BLAKE2b-256 0ba1e8ab39c43e53229d199c91b2a1a0398b8b1da7cac066042d8baeb3fe5c65

See more details on using hashes here.

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