Skip to main content

Influx Object Package

Project description

Influx Point

Description

This module enables the creation of an influx point object that can be transformed into either a JSON or LineProtocol format.

Uage

 influx_point = InfluxPoint()
        influx_point.set_measurement("measurement")
        influx_point.set_tags({"tag1": "value1"})
        influx_point.set_fields({"field1": 1, "field2": 2})
        influx_point.set_timestamp(datetime.datetime(2021, 1, 1))\
        
        print(influx_point.to_json())

            # {
            #     "measurement": "measurement",
            #     "tags": {"tag1": "value1"},
            #     "fields": {"field1": 1, "field2": 2},
            #     "timestamp": 1609455600,
            # }
        
        print(influx_point.to_line_protocol())

            # "measurement,tag1=value1 field1=1,field2=2 1609455600"

Installation

To install the package use the pip package manager

    pip install influxobject==0.0.1

Development

Tox is used as the test runner for this project. To run the tests use the following command

    tox

```bash
    tox -e py39

Build

python setup.py sdist

Publish

    twine upload dist/*

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

influxobject-0.0.2.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file influxobject-0.0.2.tar.gz.

File metadata

  • Download URL: influxobject-0.0.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for influxobject-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e7ab50675c56914f906fd91f84f31eac5e6d943b54e998ac4356872552e5e44b
MD5 2fc650f1b3845af03145315f9e2ca0ef
BLAKE2b-256 77b226dad7592d6a2b8f1d95ef127be88c31811f2bfe67350600fa2ed3b8791d

See more details on using hashes here.

Supported by

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