Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A Python client for tracking and analyzing events and LLM interactions with Trubrics.
Trubrics is a Python client that provides event tracking capabilities with a focus on LLM (Large Language Model) interactions. It features an efficient queuing system with automatic background flushing of events to the Trubrics API.
Install using pip:
pip install trubrics
Or using uv:
pip install uv
uv pip install trubrics
from trubrics import Trubrics
client = Trubrics(
api_key="your-api-key",
flush_interval=10, # seconds
flush_at=20, # events
)
# Track a simple event
client.track(
user_id="user123",
event="button_click",
properties={"button_type": "submit"},
)
# Track LLM interactions
client.track_llm(
user_id="user123",
prompt="What is the capital of France?",
assistant_id="gpt-4",
generation="The capital of France is Paris.",
properties={"model": "gpt-4"},
latency=150 # milliseconds
)
# Ensure all events are flushed before shutting down
client.close()
The client uses python's logging
library to log messages, by default at the ERROR
level.
To adjust the verbosity of the default logs, specify the log level:
trubrics = Trubrics(api_key="your-api-key")
trubrics.logger.setLevel(logging.DEBUG)
Or specify your own logger completely:
trubrics = Trubrics(api_key="your-api-key", logger=your_cool_logger)
The project uses the following main dependencies:
Using Make commands:
make setup_uv_venv
make install_dev_requirements # Install development dependencies
make install_requirements # Install production dependencies
The package is automatically published to PyPI when a new version tag is pushed. To publish a new version:
pyproject.toml
, and add changelog entry in CHANGELOG.md
trubrics-python
based on the version in pyproject.toml
, and push it
git tag -a v1.0.0 -m "Release version v1.0.0"
git push origin v1.0.0
release.yml
will be triggered. It will:
trubrics-python
based on the CHANGELOG.md
entryuv
FAQs
Python SDK to track events in Trubrics.
We found that trubrics demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.