Sensoterra
Package to retrieve Sensoterra probe data by polling the Sensoterra Customer API using async/await.
Example code
When the email and password are always available:
import time
import asyncio
from sensoterra.customerapi import CustomerApi
async def main(email, password):
api = CustomerApi(email, password)
api.set_language("en")
while True:
api.poll()
for probe in api.probes():
print(probe)
for sensor in probe.sensors():
print(sensor)
print()
time.sleep(900)
print('-' * 70)
asyncio.run(main("me@example.com", "secret"))
Otherwise request a authentication token:
from datetime import datetime
async def get_token(email, password):
api = CustomerApi(email, password)
api.set_language("en")
tag = "My Application"
scope = "READONLY"
expiration = datetime(2038, 1, 1, 0, 0)
token = await api.get_token(tag, scope, expiration)
And use this token:
async def main(email, password):
token = await get_token(email, password)
api = CustomerApi()
api.set_language("en")
api.set_token(token)
while True:
probes = await api.poll()
for probe in probes:
print(probe)
for sensor in probe.sensors():
print(sensor)
print()
time.sleep(900)
print('-' * 70)
Changelog
Metadata
Release files for sensoterra 2.0.1
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 |
|---|---|---|---|---|
| sensoterra-2.0.1.tar.gz | 7.1 kB | Without provenance | Details for sensoterra-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sensoterra-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for sensoterra-2.0.1-py3-none-any.whl |
Total release size: 13.5 kB
Release files / sensoterra-2.0.1.tar.gz
| Download URL | sensoterra-2.0.1.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59f8d33a7b3938f53cfae7c37857431a351184159415fc3fa9148741acc12f4e
|
|
BLAKE2b-256 checksum How to use checksums |
7b86a62eb7206173faca0974dc1f195b2400b49b5d0f0bf4141541c8b4189086
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.8
|
Release files / sensoterra-2.0.1-py3-none-any.whl
| Download URL | sensoterra-2.0.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b25e6a9276e1f7e71efeed41c91e326e832bb021b5d2c0532fee6dbda5c73120
|
|
BLAKE2b-256 checksum How to use checksums |
340df3b2c3af973860ad0bcb74040dde8e7e38e8740c7ecba7e7f2c462ca14f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.8
|
Security for sensoterra 2.0.1
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.