{"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,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}