Skip to main content

Influx v3 timeseries plugin for `masterpiece` applications

Project description

InfluxDB V3 Plugin for MasterPiece

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.13.tar.gz (7.9 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.13-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: masterpiece_influx-0.1.13.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for masterpiece_influx-0.1.13.tar.gz
Algorithm Hash digest
SHA256 857b6763d62618fef91748ddd85d7df05cb320af74e114ba6e94c234d214b54d
MD5 9983a33a7cac0f56fa0bd183bfb797ca
BLAKE2b-256 6dc80eed804dd92187906c9ff1ed5ad026f545122cd6a0f92e5183519739ff48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for masterpiece_influx-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 5855fc4e0a2d5e22c2e96659b4f6c66deefeb9a13b9fcce4c645644ebd071b3b
MD5 60b5e84621a53a3d5b078315ca7bd669
BLAKE2b-256 7fed2ac40b98a6608f2c39c05092c617d967d4c9eb94501f437eacc969361d03

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