TimeSeriesQL
A Pythonic query language for time series data
Table of Contents
About The Project
This project add AppOptics as a backend for the TimeSeriesQL ecosystem.
Built With
Getting Started
To get a local copy up and running follow these simple steps.
Prerequisites
The requirements are in the requirements.txt file.
Installation
pip
pip install timeseriesql-appoptics
manual
- Clone the timeseriesql-appoptics
git clone https:://github.com/mbeale/timeseriesql-appoptics.git
- Install library
cd timeseriesql-appoptics
python setup.py install
Usage
Appoptics is a commercial time series database product. The backend converts a query into an API call.
The backend expects a APPOPTICS_TOKEN environment variable to be set in order to authenticate to AppOptics.
AppOptics Query
from timeseriesql_appoptics import AOBackend
data = AOBackend(x for x in "metric.name")['1h'] #basic
data = AOBackend(x * 100 for x in "metric.name")['1h'] #binary operations (+, -, /, *)
data = AOBackend(x * 1.8 + 32 for x in "metric.name")['1h'] #multiple binary operations (°C to °F)
data = AOBackend(x.max for x in "metric.name")[3600:] #get max value
AppOptics Filtering
Currently only == and != are supported.
from timeseriesql_appoptics import AOBackend
data = AOBackend(x for x in "metric.name" if x.environment == 'production')[3600:]
AppOptics Grouping
from timeseriesql_appoptics import AOBackend
data = AOBackend(x for x in "metric.name").group('environment')[3600:]
data = AOBackend(x - y for x,y in AOBackend((x.max for x in "metric1"), (x.min for x in "metric2")).by('tag1'))[3600:]
AppOptics Time
from timeseriesql_appoptics import AOBackend
data = AOBackend(x for x in "metric.name")[:] #no start or end time (not recommended)
data = AOBackend(x for x in "metric.name")[3600:] #from now - 3600 seconds until now, resolution of 1
data = AOBackend(x for x in "metric.name")[3600:1800] #from now - 3600 seconds until now - 1800 seconds, resolution of 1
data = AOBackend(x for x in "metric.name")[3600::300] #from now - 3600 seconds until now resoultion of 300 seconds
AppOptics Functions
data = AOBackend(sum(derive(x)) for x in "metric.name")[3600:] #get the sums of the derivatives
data = AOBackend(zero_fill(x) for x in "metric.name")[3600::60] #zero_fill
AppOptics Raw Composite
data = AOBackend('s("some_metric", "*")')[3600:]
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Michael Beale - michael.beale@gmail.com
Project Link: https://github.com/mbeale/timeseriesql-appoptics
Metadata
Release files for timeseriesql-appoptics 0.1.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 | |
|---|---|---|---|---|
| timeseriesql-appoptics-0.1.0.tar.gz | 7.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| timeseriesql_appoptics-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.0 kB
Release files / timeseriesql-appoptics-0.1.0.tar.gz
| Download URL | timeseriesql-appoptics-0.1.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1cbaf2d38aadc2205fc8a9fde45c50b2ccdb70471eb84e39d8319914c0c169f
|
|
BLAKE2b-256 checksum How to use checksums |
4a011eb05694bdd36b64852e2593b2e775a120f7fdea1053be3a9df5255f300f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
|
Release files / timeseriesql_appoptics-0.1.0-py3-none-any.whl
| Download URL | timeseriesql_appoptics-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
451df606785485bdda091de457edcb533b65dd2e64c6bd36ef40113b5e093013
|
|
BLAKE2b-256 checksum How to use checksums |
5ddcf16ea1e963ad6e018c219657c0552778f531c3d0d73723168c656dc3474e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
|
Security for timeseriesql-appoptics 0.1.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.