Skip to main content

Influx v3 timeseries plugin for `masterpiece` applications

Project description

InfluxDB V3 Plugin for MasterPiece

This project adds InfluxDB V3 timeseries recording functionality to MasterPiece framework.

Usage

Pre-requisities:

  • Create Influx cloud account, or install local Influx instance. Please consult the Influx site for more information on this.

To install the 'masterpiece_influx' plugin:

.. code-block:: bash

pip install masterpiece_influx

Once installed, you can create ~/.yourapp/config/Influx.json configuration file to specify information needed for reading and writing time series data to your Influx database.

.. code-block:: text

{ "token": "your token", "org": "your organization", "host": "https://eu-central-1-1.aws.cloud2.influxdata.com", "database": "your database" }

To import and instantiate Influx database for use:

.. code-block:: python

from masterpiece_influx import Influx

db = Influx()

An example to write and read data:

.. code-block:: python

db.write_dict(name="temperature", tags={"sensor": "A1"}, fields={"value": 23.4}, ts="2024-12-14T12:00:00Z") data = db.read_dict(measurement="temperature", start_time="2024-12-01T00:00:00Z")

Note

The masterpiece_influx.Influx class is an implementation of the abstract masterpiece.TimeSeries base class, designed for reading and writing time series data. The TimeSeries interface allows all time series operations in your application to remain implementation-independent.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

masterpiece_influx-0.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

masterpiece_influx-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file masterpiece_influx-0.1.0.tar.gz.

File metadata

  • Download URL: masterpiece_influx-0.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for masterpiece_influx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 27111d7598958d594bcfff9404ba39fc02720f002d13d0d211ccc3ee0cb5f4c3
MD5 fe38a2f777e0852defd717ae62cdfab2
BLAKE2b-256 35e21f1c2cecf5afc4e6a49315856260dccefb15d1de1c9a37348bab9a55b445

See more details on using hashes here.

File details

Details for the file masterpiece_influx-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for masterpiece_influx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81667c85608de6f8657b55eb944ca263f87d6d537a9e2912d99402dca67a71a0
MD5 29307ea61f6da2432570677f89b7c917
BLAKE2b-256 5445dde4d9e31876d7199d3160a2a0dab4c204a9ae51c414c6e8d306dd15d505

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