OpenInference Portkey AI Instrumentation
This package provides instrumentation for the Portkey AI library using OpenInference.
Installation
pip install openinference-instrumentation-portkey
Usage
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import ConsoleSpanExporter
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
from openinference.instrumentation.portkey import PortkeyInstrumentor
# Set up the tracer provider
trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
SimpleSpanProcessor(ConsoleSpanExporter())
)
# Instrument Portkey AI
PortkeyInstrumentor().instrument()
# Use Portkey AI as usual
# ...
# Uninstrument when done
PortkeyInstrumentor().uninstrument()
Features
- Automatic instrumentation of Portkey AI API calls
- Capture of input messages, output messages, and model information
- Integration with OpenTelemetry for distributed tracing
Requirements
- Python 3.10+
- Portkey AI 0.1.0+
License
Apache License 2.0
Metadata
Release files for openinference-instrumentation-portkey 0.1.24
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 |
|---|---|---|---|---|
| openinference_instrumentation_portkey-0.1.24.tar.gz | 7.9 kB | With provenance | Details for openinference_instrumentation_portkey-0.1.24.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openinference_instrumentation_portkey-0.1.24-py3-none-any.whl | Python 3 | none | any | Details for openinference_instrumentation_portkey-0.1.24-py3-none-any.whl |
Total release size: 19.3 kB
Release files / openinference_instrumentation_portkey-0.1.24.tar.gz
| Download URL | openinference_instrumentation_portkey-0.1.24.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
724dc39103dbee28dde7155dc5e627408b58814093c73fe9323e738e908fb525
|
|
BLAKE2b-256 checksum How to use checksums |
0b7c8da2faeabfc1a7c7efa516aa110713806382436cda88e73cce17b74da422
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / openinference_instrumentation_portkey-0.1.24-py3-none-any.whl
| Download URL | openinference_instrumentation_portkey-0.1.24-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
797cf328f7f4b7b2c3ee77bea214dc706fade7f169b9a6feab17c538b1b3b3ec
|
|
BLAKE2b-256 checksum How to use checksums |
8af2931473f17b60df3120034cbbb32c443e23f795fe8863f90157f8fe671a01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for openinference-instrumentation-portkey 0.1.24
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for openinference_instrumentation_portkey-0.1.24.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA 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.