I wonder why are there two Client classes? for datasets
phoenix_client = px.Client()while for prompts it's
from phoenix.client import Client
client = Client()Both px.Client() and phoenix.client.Client() refer to the same underlying class for interacting with Phoenix servers; the difference is just in the import path. The recommended and current approach is to use from phoenix.client import Client for all client operations, including datasets and prompts, as the client SDK has been modularized and decoupled from the main phoenix package for lightweight usage in applications (docs, migration note).If you see px.Client(), it's likely an older usage or an alias (import phoenix as px). For new code, always use from phoenix.client import Client to ensure compatibility and clarity (docs, api ref). Would you like more detail on the client structure or migration?Sources:
- Phoenix API Reference: client
- phoenix-client migration PR
- docs
💡 Hint: Mention RunLLM in the thread for followups.
If you tell me the right answer to this question, I'll make sure I don't make the same mistake twice!
Feedback
Type the right answer here...
↵ Please 'enter' to submit
