Base10

Base10 is a metrics abstractoin layer for linking multiple metrics source and stores. It also simplifies metric creation and proxying.
Documentation
Base10’s documentation can be found at https://base10.readthedocs.io
Installing Base10
Base10 can be installed from Pypi using pip:
pip install base10
Example
This shows a simple metric generator that writes a JSON formatted metric, containing a random value, to RabbitMQ.
from random import random
from time import sleep
from base10 import MetricHelper, MetricHandler
from base10.dialects import JSONDialect
from base10.transports import RabbitMQWriter
if __name__ == '__main__':
class MyMetric(MetricHelper):
_name = 'metric'
_fields = [
'value',
]
_metadata = [
'hostname',
]
class JSON(MetricHandler):
_dialect = JSONDialect()
_writer = RabbitMQWriter(
broker='127.0.0.1', exchange='amq.topic', topic='metrics.example')
json = JSON()
while True:
json.write(MyMetric(value=random(), hostname='test'))
sleep(1)
This shows a simple proxy that reads JSON formatted metrics from RabbitMQ and outputs them in InfluxDB format over a UDP socket.
from base10 import MetricHandler
from base10.dialects import JSONDialect, SplunkDialect #InfluxDBDialect
from base10.transports import RabbitMQReader, UDPWriter
if __name__ == '__main__':
class RabbitMQ(MetricHandler):
_dialect = JSONDialect()
_reader = RabbitMQReader(
broker='127.0.0.1', exchange='amq.topic', routing_key='metrics.#')
class InfluxDB(MetricHandler):
_dialect = SplunkDialect() #InfluxDBDialect()
_writer = UDPWriter(host='127.0.0.1', port=10000)
rabbitmq = RabbitMQ()
influxdb = InfluxDB()
for metric in rabbitmq.read():
influxdb.write(metric)
Contributing
To contribute to base10, please make sure that any new features or changes to existing functionality include test coverage.
Pull requests that add or change code without coverage will most likely be rejected.
Additionally, please format your code using yapf with facebook style prior to issuing your pull request.
yapf --style=facebook -i -r base10 setup.py
Metadata
Release files for base10 0.6.3
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 |
|---|---|---|---|---|
| base10-0.6.3.tar.gz | 8.7 kB | Without provenance | Details for base10-0.6.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| base10-0.6.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for base10-0.6.3-py2.py3-none-any.whl |
Total release size: 22.2 kB
Release files / base10-0.6.3.tar.gz
| Download URL | base10-0.6.3.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d764a2b631d7f19e6ca9e36243e934aa83426880cec031e106c83a7a596867f6
|
|
BLAKE2b-256 checksum How to use checksums |
d59274f0495a21cac86b38514629105c171a74d03cf318a07281f78255a516bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / base10-0.6.3-py2.py3-none-any.whl
| Download URL | base10-0.6.3-py2.py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
047d17a876e389648ddbc9fac917ef383c6b4c4900d00be480418c633914151d
|
|
BLAKE2b-256 checksum How to use checksums |
1da09e2091f9eab1d982ef8a3f57b13655172599cca10d0f3fcdb112860c303c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for base10 0.6.3
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.