SFLUX
Simple Influx DB wrapper for python. Builds on top of influxdb-client to make the use of Influxdb as simple as possible
Basic Usage
1. Querying data
Sflux transforms the FluxQL syntaxis into intuitive python commands that try to follow FluxQL as close as possible. A simple query looks like this:
import sflux
with sflux.Client(url='your_host', token='your_token', org='your_org') as client:
result = client.query(bucket='your_bucket')\
.range(start='-1d')\
.filter(sflux.ROW('_measurement') == 'your_measurement')\
.pivot()\
.filter(sflux.ROW('your_column') != 'something')\
.to_dict()
2. Writing data
The writing of time series into the database is acheived by building measurement objects for each measurement to be inserted:
import time
import sflux
measurements = [
sflux.Measurement('measurement_name', field1='value1', field2='value2')
.tags(tag1='tag1', tag2='tag2')
.time(time.time())
]
with sflux.Client(url='your_host', token='your_token', org='your_org') as client:
client.write('your_bucket', measurements)
3. Usage considerations
This library is still under development and should be used with care. Please report any bugs as issues and they will be addressed promptly.
For now Sflux does not implement string checks to avoid Injections. Please always verify any user input before passing it to Sflux. String checking will be implemented in future releases.
Metadata
Release files for sflux 0.0.35
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 |
|---|---|---|---|---|
| sflux-0.0.35.tar.gz | 8.6 kB | Without provenance | Details for sflux-0.0.35.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sflux-0.0.35-py3-none-any.whl | Python 3 | none | any | Details for sflux-0.0.35-py3-none-any.whl |
Total release size: 17.2 kB
Release files / sflux-0.0.35.tar.gz
| Download URL | sflux-0.0.35.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca7890e47e6f9752cca16d64a291b17d090bbb87f8ace89dc45eb7816deac114
|
|
BLAKE2b-256 checksum How to use checksums |
b3434cf11f469ea9e7507fc968decb374cae5e81b98c0c81b0a7322a10025285
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / sflux-0.0.35-py3-none-any.whl
| Download URL | sflux-0.0.35-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71851ed0e0fe8f52b746af6245bc7dc20889f791ad78a2553f6a54a57cbb2853
|
|
BLAKE2b-256 checksum How to use checksums |
75fa977f1f82747b326140a5ecd631250a54a30bbcefbe2967dc00112fac35ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for sflux 0.0.35
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.