{"id":27233,"library":"phonic","title":"Phonic Python SDK","description":"Phonic is an AI evaluation and monitoring platform. The Python SDK (v0.31.15) provides tools to log evaluations, manage datasets, and analyze AI model performance. Release cadence is irregular; breaking changes may occur.","status":"active","version":"0.31.15","language":"python","source_language":"en","source_url":"https://github.com/Phonic-Co/phonic-python","tags":["ai-evaluation","monitoring","sdk"],"install":[{"cmd":"pip install phonic","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Core dependency for data handling; downgrade in v0.31.15 may cause conflicts if newer numpy is required by other packages.","package":"numpy","optional":false}],"imports":[{"note":"Direct import of module fails; import class explicitly.","wrong":"import phonic","symbol":"Phonic","correct":"from phonic import Phonic"},{"note":"Path changed in recent versions; now top-level.","wrong":"from phonic.evaluations import EvaluationLog","symbol":"EvaluationLog","correct":"from phonic import EvaluationLog"}],"quickstart":{"code":"from phonic import Phonic\n\nclient = Phonic(api_key=os.environ.get('PHONIC_API_KEY', ''))\n# Log an evaluation\nclient.log_evaluation(\n    project_name='my-project',\n    input='What is the capital of France?',\n    output='Paris',\n    expected='Paris',\n    scores={'accuracy': 1.0}\n)","lang":"python","description":"Initialize client with API key from env var and log an evaluation."},"warnings":[{"fix":"Replace 'from phonic import Client' with 'from phonic import Phonic'.","message":"The 'Phonic' class replaced 'Client' in v0.30.0; 'Client' is removed.","severity":"breaking","affected_versions":"<0.30.0"},{"fix":"Replace 'correct=...' with 'expected=...'.","message":"Argument 'correct' in log_evaluation is deprecated; use 'expected' instead.","severity":"deprecated","affected_versions":">=0.28.0,<0.32.0"},{"fix":"client = Phonic(api_key=os.environ.get('PHONIC_API_KEY', ''))","message":"API key must be passed as string; environment variable 'PHONIC_API_KEY' is not automatically read by client init. Use os.environ.get() explicitly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'ai':7,25,37 'ai-evalu':36 'analyz':24 'break':32 'cadenc':29 'chang':33 'dataset':22 'evalu':8,20,38 'irregular':31 'log':19 'manag':21 'may':34 'model':26 'monitor':10,39 'occur':35 'perform':27 'phonic':1,4 'platform':11 'provid':16 'python':2,13 'releas':28 'sdk':3,14,40 'tool':17 'v0.31.15':15","created_at":"2026-05-01T17:45:12.254609+00:00","updated_at":"2026-05-01T17:45:12.254609+00:00","problems":[{"fix":"Run 'pip install --upgrade phonic' and use 'from phonic import Phonic'.","cause":"Old installation or wrong import path; class name changed from 'Client' to 'Phonic'.","error":"ImportError: cannot import name 'Phonic' from 'phonic'"},{"fix":"Use 'from phonic import Phonic' and instantiate 'Phonic(api_key=...)'.","cause":"Using deprecated class name 'Client' which was removed in v0.30.0.","error":"AttributeError: module 'phonic' has no attribute 'Client'"},{"fix":"Replace keyword argument 'correct' with 'expected'.","cause":"Parameter 'correct' was renamed to 'expected' in recent versions.","error":"TypeError: log_evaluation() got an unexpected keyword argument 'correct'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"phonic","cli_version":"sh: 1: phonic: not found","type":"library","homepage":"https://phonic.ai","github":"https://github.com/Phonic-Co/phonic-python","docs":null,"changelog":null,"pypi":"https://pypi.org/project/phonic/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["observability","ai-ml","llm-agents"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}