Skip to main content

Python client library for the OpenPipe service

Project description

OpenPipe Python Client

This client allows you automatically report your OpenAI calls to OpenPipe. OpenPipe


pip install openpipe


  1. Create a project at
  2. Find your project's API key at
  3. Configure the OpenPipe client as shown below.
from openpipe import openai, configure_openpipe
import os

# Set the OpenPipe API key you got in step (2) above.
# If you have the `OPENPIPE_API_KEY` environment variable set we'll read from it by default.

# Configure OpenAI the same way you would normally
openai.api_key = os.getenv("OPENAI_API_KEY")

You can now use your new OpenAI client, which functions identically to the generic OpenAI client while also reporting calls to your OpenPipe instance.

Special Features


OpenPipe has a concept of "tagging." This is very useful for grouping a certain set of completions together. When you're using a dataset for fine-tuning, you can select all the prompts that match a certain set of tags. Here's how you can use the tagging feature:

completion = openai.ChatCompletion.create(
    messages=[{"role": "system", "content": "count to 10"}],
    openpipe={"tags": {"prompt_id": "counting"}},

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openpipe-3.2.0.tar.gz (16.7 kB view hashes)

Uploaded source

Built Distribution

openpipe-3.2.0-py3-none-any.whl (28.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page