Registry / observability / arize-phoenix-client

arize-phoenix-client

JSON →
library3.3.0pypypi✓ verified 22d ago

The Arize Phoenix Client is a lightweight Python package designed for interacting with the Phoenix platform via its OpenAPI REST interface. It enables users to programmatically manage datasets, run experiments, analyze traces, and collect feedback, primarily focusing on LLM observability. The library is actively maintained with frequent updates.

pip install arize-phoenix-client
INSTALL
IMPORT
SIG · ARIZE-PHOENIX-CLIE
A
arize-phoenix-client
observabilitypythonv3.3.0
Install
5.9s avg
Import
1075ms
Disk
55MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.248s · 57.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.9s · import 0.902s · 56MB
55MB installed
● package 55MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from phoenix.client import Client
from arize_phoenix.client import Client
The top-level module for imports is `phoenix`, not `arize_phoenix`.
AsyncClient
from phoenix.client import AsyncClient

This quickstart demonstrates how to initialize the Phoenix client and interact with datasets. It shows how to create a dataset from a Pandas DataFrame and then retrieve it. Ensure your Phoenix server is running and accessible, and configure `PHOENIX_BASE_URL` and `PHOENIX_API_KEY` (if using cloud) via environment variables or directly in the `Client` constructor.

import os from phoenix.client import Client import pandas as pd # Configure Phoenix Client using environment variables or directly # For local Phoenix server (default): export PHOENIX_BASE_URL="http://localhost:6006" # For Phoenix Cloud: export PHOENIX_API_KEY="your-api-key" and export PHOENIX_BASE_URL="https://app.phoenix.arize.com/s/your-space" # Ensure PHOENIX_BASE_URL is set, or pass it directly. # Example: Directly configuring for a local server, ensure a Phoenix server is running. client = Client(base_url=os.environ.get('PHOENIX_BASE_URL', 'http://localhost:6006')) try: # Create a simple DataFrame df = pd.DataFrame({ "question": [ "What is the capital of France?", "Who wrote Hamlet?" ], "answer": [ "Paris", "William Shakespeare" ] }) # Create a dataset in Phoenix dataset_name = "my-qa-dataset" dataset = client.datasets.create_dataset( name=dataset_name, dataframe=df, input_keys=["question"], output_keys=["answer"] ) print(f"Successfully created dataset: {dataset.name} with {len(dataset)} examples.") # Retrieve the dataset retrieved_dataset = client.datasets.get_dataset(dataset=dataset_name) print(f"Retrieved dataset: {retrieved_dataset.name}.") except Exception as e: print(f"An error occurred: {e}") print("Please ensure the Phoenix server is running and accessible at the specified base_url.")
Debug
Known issues
breakingThe legacy `phoenix.session.client.Client` (accessed as `px.Client()`) has been removed in `arize-phoenix 14.0.0` (corresponding to `arize-phoenix-client 2.3.1+`). All client interactions must now use `from phoenix.client import Client`.
fix
Migrate your code to use `from phoenix.client import Client`. The `endpoint` parameter for initialization is now `base_url`. Client methods are now organized under resource namespaces (e.g., `client.spans`, `client.traces`, `client.datasets`) instead of being flat on the client object. Refer to the official migration guide for a detailed mapping.
affects: arize-phoenix 14.0.0+, arize-phoenix-client 2.3.1+
breakingEvals 1.0 and the legacy experiments module have been removed. This affects `arize-phoenix-evals 3.0.0` and `arize-phoenix-client 2.3.1+`.
fix
Update your evaluation workflows to use the latest evaluation API. This means the `legacy/` subpackage and its models/wrappers, `MultimodalPrompt`, `PromptPartContentType`, and `PromptPart` types are no longer available. All adapter methods now use `PromptLike`. The `/v1/evaluations` endpoint is also removed.
affects: arize-phoenix-client 2.3.1+, arize-phoenix-evals 3.0.0+
deprecatedThe `client.annotations` module was removed. Its functionality has been integrated into `client.spans`.
fix
Replace calls to `client.annotations.add_span_annotation()` or `client.annotations.log_span_annotations()` with `client.spans.add_span_annotation()` and `client.spans.log_span_annotations()` respectively.
affects: arize-phoenix-client 2.0.0+
Errors
Common errors & fixes
AttributeError: 'Client' object has no attribute 'get_dataset'
The 'get_dataset' method is not available in the 'arize-phoenix-client' package; it is part of the 'arize-phoenix' package.
fix
Install the 'arize-phoenix' package to access the 'get_dataset' method.
ImportError: cannot import name 'version' from 'phoenix.version'
The 'version' attribute is not present in the 'phoenix.version' module.
fix
Ensure you are using compatible versions of 'arize-phoenix' and 'arize-phoenix-client' to avoid import errors.
ModuleNotFoundError: No module named 'phoenix.evals'
The 'phoenix.evals' module is not found, possibly due to an incomplete installation or missing package.
fix
Verify that the 'arize-phoenix-evals' package is installed and correctly configured.
ERROR: Could not find a version that satisfies the requirement phoenix-client>=0.1.0 (from versions: none) ERROR: No matching distribution found for phoenix-client>=0.1.0
The PyPI package name for the Arize Phoenix Client is 'arize-phoenix-client', but users often incorrectly refer to it as 'phoenix-client' when installing or specifying dependencies.
fix
Use the correct package name `arize-phoenix-client` in your `pip install` command or `requirements.txt` file.
```bash
pip install arize-phoenix-client
# or in requirements.txt:
arize-phoenix-client>=0.1.0
```
ModuleNotFoundError: No module named 'phoenix.client'
While the PyPI package is `arize-phoenix-client`, the primary class `Client` is imported from the `phoenix.client` module, not directly from `phoenix` if `arize-phoenix` (the full platform) is not installed. If `arize-phoenix` is installed, the client is part of it.
fix
Ensure you are importing the `Client` class from the `phoenix.client` submodule.
```python
from phoenix.client import Client
client = Client()
```
Upgrade
Version history
3.3.0latest on PyPI · released Aug 22, 2026
Audit
Dependencies
pythonrequiredRequired Python version for the library.
arize-phoenix-evalsoptionalOften installed alongside for LLM evaluation capabilities.
Agent activity
48 hits · last 30 days
node
36
OpenAI (training)
2
Perplexity
1
Resources
arize-phoenix-client — pip install arize-phoenix-client · libregistry