Eniris API Driver for Python
raw JSON → 0.9.4 verified Mon Apr 27 auth: no python
Official Python driver for the Eniris API. Used to write telemetry data (float/int/string points) to the Eniris platform, with support for buffered, background writing and connection management. Current version is 0.9.4. Release cadence is irregular, roughly monthly.
pip install eniris Common errors
error ModuleNotFoundError: No module named 'eniris' ↓
cause The library is not installed or installed in a different environment.
fix
Run 'pip install eniris' in the correct Python environment.
error AttributeError: module 'eniris' has no attribute 'ApiDriver' ↓
cause Possibly an older version of the library (before ApiDriver was introduced) or a typo in import.
fix
Install the latest version: 'pip install --upgrade eniris'. Ensure import is 'from eniris import ApiDriver'.
error ConnectionError: Failed to connect to Eniris API ↓
cause Invalid or missing client credentials (client_id, client_secret).
fix
Set ENIRIS_CLIENT_ID and ENIRIS_CLIENT_SECRET environment variables or pass correct values to ApiDriver.
Warnings
breaking In v0.9.4, ApiDriver.get, .post, .put, .delete now merge keyword arguments with default values. Callers relying on default overrides may see changed behavior if they pass kwargs. ↓
fix Review any custom calls to these methods and ensure explicit overrides are passed if needed.
gotcha The BufferedPointToTelemessageWriter retries on failure by default. In v0.9.1 and later, the retry delay is actually respected; earlier versions had a bug that caused rapid retries. ↓
fix Upgrade to >=0.9.1 to get proper retry delay behavior.
gotcha Background writer threads are named with a default prefix. You can add a suffix using the 'thread_name_suffix' parameter. If your application relies on thread names for monitoring, be aware of the naming pattern. ↓
fix Specify a custom 'thread_name_suffix' if you need identifiable thread names.
deprecated The 'value' field in Point may be deprecated in future; prefer explicit 'valueFloat', 'valueInt', 'valueString' depending on type. ↓
fix Use typed value fields (valueFloat, valueInt, valueString) instead of a generic 'value'.
Imports
- ApiDriver
from eniris import ApiDriver - Point
from eniris import Point - RuntimePoint
from eniris import RuntimePoint - BufferedPointToTelemessageWriter
from eniris import BufferedPointToTelemessageWriter
Quickstart
import os
from eniris import ApiDriver, Point
driver = ApiDriver(
client_id=os.environ.get('ENIRIS_CLIENT_ID', ''),
client_secret=os.environ.get('ENIRIS_CLIENT_SECRET', '')
)
point = Point(
ts=1234567890,
path='demo.path',
objectType='demo.objectType',
unit='celsius',
valueFloat=25.5
)
driver.post_points([point])
print('Point sent successfully')