Skip to main content

Chouette-IoT-Client

Python client library for Chouette-IoT metrics collection agent.

This library can be used in applications to send Datadog-ish like messages to a Chouette-IoT metrics aggregator.
It uses Redis as a broker. Metrics are being stored in Redis and then they are collected, processed and dispatched by Chouette-IoT.

This library is able to send follow metric types: count, gauge, histogram, rate and set. distribution metric is NOT supported.

Examples

Usage example:

from time import time
from chouette_iot_client import ChouetteClient

# These metrics takes a float as their value:
ChouetteClient.count(metric="my.count.metric", value=1, timestamp=time(), tags={"importance": "high"})
ChouetteClient.gauge("my.gauge.metric", 1)
ChouetteClient.histogram("my.histogram.metric", 1.5)
ChouetteClient.rate("my.rate.metric", 1)

# Set metric takes a list or a set as its value:
ChouetteClient.set("my.set.metric.set", {1, 2, 3})
ChouetteClient.set("my.set.metric.list", [1, 2, 3])

Metric name metric and value are mandatory parameters. timestamp and tags are optional.
When no timestamp is specified, actual time is automatically taken. When no tags are specified, empty dict is being sent.

Also ChouetteClient supports timed both as a context manager and a decorator:

from time import sleep
from chouette_iot_client import timed

# ContextManager:
with timed(metric="my.timed.context_manager", tags={"units": "seconds"}, use_ms=False):
    sleep(1)

# Decorator:
@timed(metric="my.timed.decorator", tags={"units": "milliseconds"}, use_ms=True)
def rest():
    sleep(1)

rest()

Both these options will send the same data. But in one case it's going to be a value in seconds (~1.0) and in another case it will be a value in milliseconds (~1000).

License

Chouette-IoT-Client is licensed under the Apache License, Version 2.0.

Metadata

Release files for chouette-iot-client 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chouette-iot-client 0.0.1
File Size Uploaded Provenance Actions
chouette-iot-client-0.0.1.tar.gz 6.3 kB Without provenance Details for chouette-iot-client-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chouette-iot-client 0.0.1
File Interpreter ABI Platform Actions
chouette_iot_client-0.0.1-py3-none-any.whl Python 3 none any Details for chouette_iot_client-0.0.1-py3-none-any.whl

Total release size: 18.9 kB

Release files / chouette-iot-client-0.0.1.tar.gz

Download URL chouette-iot-client-0.0.1.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
859fdf4f8b2d6f9767f4ab9905b7bbda9fdf935865bfb20c558c4604600affd5
BLAKE2b-256 checksum
How to use checksums
11f95f1eae3c076ffaee62522bac7e4e661c28a8e0ac9a7d8ede01da701b4797
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3

Release files / chouette_iot_client-0.0.1-py3-none-any.whl

Download URL chouette_iot_client-0.0.1-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29d97660cd833e7e1d0544f4f6ea294013180d0f37700e971ff05d016f480ac8
BLAKE2b-256 checksum
How to use checksums
725c5aab8a824e86dc8c5f0cde44deeca76248dc21d7d4099385cd42470cc60a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.3

Security for chouette-iot-client 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page