Skip to main content

Simple library for send metric into pushgateway

Project description

Python3 pushgateway library

About

Python3 library with functions for sending metrics to Pushgateway.

Install

pip install pflib

Usage

Metric:

Function Args needed Description
added_label label(dict), value(any, only is decimal) Added metric.
send none Sends metrics from temporary file to Pushgateway and deletes the file afterwards.
validate_metric none This functions use to validate metric.
__init__ name, type, help, script_name(job) Initializing metric. Type - all str.
__str__ none Printing metric in pushgateway format.

Examples

Please check example.py

How to use

Edit metric

import os

from pflib import metric

file_name = os.path.basename(__file__)

my_metric = metric("metric:name1", "counter", "helpMetric", file_name)
print(my_metric.name)

# Printing - metric:name1

my_metric.name = "example"
print(my_metric.name)

# Printing - example

# For more check pls pf.py def __init__

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

pflib-0.0.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

pflib-0.0.3-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file pflib-0.0.3.tar.gz.

File metadata

  • Download URL: pflib-0.0.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for pflib-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5ff7888d25f7e7bc228e39dccfe763f82347860abdc7bf3762c38f539ca03304
MD5 d8dba4f96e3603953c0ccdea35c24069
BLAKE2b-256 8e9fe187ffd263e5e8518a1d8109886475ff1f86011d9905f7303e96977d5c8d

See more details on using hashes here.

File details

Details for the file pflib-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: pflib-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for pflib-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b01595e6f146336c7d1c00f703e34ee92b67c63a359c7d2db5b51a82b556dec5
MD5 d8d0f9ad3a99c29c37a000fe4f449f44
BLAKE2b-256 3b31c40689e6f2b60439cadc3431d94e9564ecf10f84700685fda2f5a4e97655

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