====================
This repository contains simple python client for Warp10 metric
engine.
Examples:
Create client object
--------------------
```
kwargs = {
'write_token': write_token,
'read_token': read_token,
'warp10_api_url': warp10_api_url,
}
import warp10client
client = warp10client.Warp10Client(**kwargs)
```
Send metric
-----------
To write metrics (one or multiple at same time)
```
metric_write = [
{
'name': 'cpu_util_mjozefcz',
'tags': {
'resource_id': '18d94676-077c-4c13-b000-27fd603f3056',
'project_id': '8069f876e7d444249ef04b9a74090711',
'unit': '%',
},
'position': {
'longitude': None,
'latitude': None,
'elevation': None,
'timestamp': time() * 1000 * 1000,
},
'value': 11,
}
]
metric_send = client.set(metric_write)
metric_send
[<Metric cpu_util_mjozefcz value=11 timestamp=1.50660126016e+15 lat_lon= elevation= project_id=8069f876e7d444249ef04b9a74090711 resource_id=18d94676-077c-4c13-b000-27fd603f3056 unit=%>]
```
Get metric
----------
```
metric_get = {
'name': 'cpu_util',
'tags': {
'resource_id': '18d94676-077c-4c13-b000-27fd603f3056',
'project_id': '8069f876e7d444249ef04b9a74090711',
},
'aggregate': {
'type': 'mean',
'span': 1000000 * 3600,
},
'timestamp': { 'start': "2017-01-01T00:00:00.000Z", 'end': "2018-01-01T00:00:00.000Z" }
#'timestamp': { 'end': "2018-01-01T00:00:00.000Z" }
#'timestamp': { 'start': None, 'end': None }
}
metric_get_test = client.get(metric_get)
metric_get_test
<warp10client.timeserie.Timeserie object at 0x7f3e144baf90>
```
Check metric
------------
```
metric_check= {
'name': 'cpu_util',
'tags': {
'resource_id': '18d94676-077c-4c13-b000-27fd603f3056',
'project_id': '8069f876e7d444249ef04b9a74090711',
},
}
metric_exists = client.exists(metric_check)
metric_exists
True
```
Delete metric
-------------
TDB
Metadata
Release files for warp10client 0.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 |
|---|---|---|---|---|
| warp10client-0.0.0.tar.gz | 10.8 kB | Without provenance | Details for warp10client-0.0.0.tar.gz |
Release files / warp10client-0.0.0.tar.gz
| Download URL | warp10client-0.0.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e01f5c10b84c05a5ddb2dd950f0f65b2506c1f44f5018cf61e66b597417843a
|
|
BLAKE2b-256 checksum How to use checksums |
35d996e8d4530e39ecf2383528d7041c0c0353f33a28ee36fd921f5890e4efef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for warp10client 0.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.