Skip to main content

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__

Metadata

Release files for pflib 0.0.3

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

Source distribution (sdist)

Source distribution for pflib 0.0.3
File Size Uploaded
pflib-0.0.3.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pflib 0.0.3
File Interpreter ABI Platform
pflib-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.9 kB

Release files / pflib-0.0.3.tar.gz

Download URL pflib-0.0.3.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5ff7888d25f7e7bc228e39dccfe763f82347860abdc7bf3762c38f539ca03304
BLAKE2b-256 checksum
How to use checksums
8e9fe187ffd263e5e8518a1d8109886475ff1f86011d9905f7303e96977d5c8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release files / pflib-0.0.3-py3-none-any.whl

Download URL pflib-0.0.3-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b01595e6f146336c7d1c00f703e34ee92b67c63a359c7d2db5b51a82b556dec5
BLAKE2b-256 checksum
How to use checksums
3b31c40689e6f2b60439cadc3431d94e9564ecf10f84700685fda2f5a4e97655
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.14

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

1 release file

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