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 (<https://arize-phoenix.readthedocs.io/en/latest/api/client.html|docs>, <https://github.com/Arize-ai/phoenix/pull/6448|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 (<https://docs.arize.com/phoenix/sdk-api-reference/python-pacakges/arize-phoenix-client|docs>, <https://arize-phoenix.readthedocs.io/en/latest/api/client.html|api ref>). Would you like more detail on the client structure or migration?
Sources:
- <https://arize-phoenix.readthedocs.io/en/latest/api/client.html|Phoenix API Reference: client>
- <https://github.com/Arize-ai/phoenix/pull/6448|phoenix-client migration PR>
- <https://docs.arize.com/phoenix/sdk-api-reference/python-pacakges/arize-phoenix-client|docs>