__ __ __
.--.--.--|__.-----| |--| |--.-----.-----.-----.
| | | | |__ --| | _ | _ | | -__|
|________|__|_____|__|__|_____|_____|__|__|_____|
version 2.1.2
Build composable event pipeline servers with minimal effort.
=======================
wishbone.encode.flatten
=======================
Version: 1.0.0
Flattens a dict structure of arbitrary depth into individual metric events.
---------------------------------------------------------------------------
This module takes a <dict> structure and recursively travels it
flattening the namespace into a dotted format untill a numeric value
is encountered. For each metric a <wishbone.event.Metric>
datastructure is created and stored in the @data part of
<wishbone.event.Event>.
Non-numeric values are ignored.
For example:
{"server": {"host01": {"memory": {"free": 10, "consumed": 90}}}}
Would generate following metrics:
server.host01.memory.free
server.host01.memory.consumed
These metrics are converted to the Wishbone metric data format:
http://wishbone.readthedocs.org/en/latest/logs%20and%20metrics.html#format
The module is expecting a Python <dict> type. That means you should have
already decoded the incoming data using a module like wishbone.decode.json.
Parameters:
- source(str)("@data")
| The event field containing the data to convert.
- type(str)("wishbone")
| An arbitrary string to assign to the "type" field of the Metric
| datastructure.
- metric_source(str)("wishbone")
| An arbitrary string to assign to the "source" field of the Metric
| datastructure.
- tags(set)()
| An arbitrary set of tags assign to the "tags" field of the Metric
| datastructure.
Queues:
- inbox: Incoming events.
- outbox: Outgoing events with @data containing the wishbone.event.Metric data.
Metadata
Release files for wishbone_encode_flatten 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wishbone_encode_flatten-1.0.0.tar.gz | 3.4 kB | Without provenance | Details for wishbone_encode_flatten-1.0.0.tar.gz |
Release files / wishbone_encode_flatten-1.0.0.tar.gz
| Download URL | wishbone_encode_flatten-1.0.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e33108192987c3b75722800304834d61e6bf5efb8730d8742a58166ff59e12ba
|
|
BLAKE2b-256 checksum How to use checksums |
e6131faf0a9b8016b2c52fededa6a3bb10cd0c9a905ccd355554d014ee2ec26d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for wishbone_encode_flatten 1.0.0
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.