configure¶
- opik.configure(api_key: str | None = None, workspace: str | None = None, url: str | None = None, use_local: bool = False, force: bool = False, automatic_approvals: bool | None = None, url_override: str | None = None, project_name: str | None = None, install_mcp: bool | None = None) None¶
Create a local configuration file for the Python SDK. If a configuration file already exists, it will not be overwritten unless the force parameter is set to True.
- Parameters:
api_key – The API key if using an Opik Cloud.
workspace – The workspace name if using an Opik Cloud.
url – The URL of the Opik instance if you are using a local deployment. [Deprecated: use url_override instead]
url_override – The URL of the Opik instance if you are using a local deployment.
use_local – Whether to use a local deployment.
force – If true, the configuration file will be recreated and existing settings will be overwritten with passed parameters. Furthermore, all settings will be auto-accepted without user confirmation if automatic_approvals is not set to False.
automatic_approvals – if True, yes will automatically be answered whenever a user approval is required
project_name – The name of the project to configure. If not provided, the default project will be used.
install_mcp – If True, register the Opik MCP server with detected AI hosts; if False, skip the step. If None, the user is prompted in interactive sessions.
- Raises:
ConfigurationError –