Skip to main content

Influx Object Package

Project description

Influx Point

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"

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.1.tar.gz (4.4 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: influxobject-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 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.1.tar.gz
Algorithm Hash digest
SHA256 8a806ea482ea13f99f64ffa45f8a8cd73371c6f79cedce59bbe3a71299bb4091
MD5 2cc9f343339cfa2fa71ce476e4a1a7e0
BLAKE2b-256 19787c42d9d4bfe6bfd38add83c8f4af49bb799dba96aa9c9312f988f772841b

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