{"id":23058,"library":"cvat-sdk","title":"CVAT SDK","description":"CVAT SDK provides a Python client for the Computer Vision Annotation Tool (CVAT) API. Version 2.64.0, requires Python >=3.10. It supports task management, annotation upload/download, and integration with CVAT server. Release cadence is regular, following CVAT releases.","status":"active","version":"2.64.0","language":"python","source_language":"en","source_url":"https://github.com/cvat-ai/cvat-sdk","tags":["annotation","computer-vision","cvat","sdk","automation"],"install":[{"cmd":"pip install cvat-sdk","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP client for API calls","package":"requests","optional":false},{"reason":"Data classes for models","package":"attrs","optional":false},{"reason":"Image handling","package":"Pillow","optional":true}],"imports":[{"note":"Alias changed in 2.x; direct import from submodule deprecated.","wrong":"from cvat_sdk.client import Client","symbol":"Client","correct":"from cvat_sdk import Client"},{"note":"Core subpackage removed in 2.x.","wrong":"from cvat_sdk.core.models import Task","symbol":"Task","correct":"from cvat_sdk.models import Task"}],"quickstart":{"code":"import os\nfrom cvat_sdk import Client\n\nclient = Client(\n    url=os.environ.get('CVAT_URL', 'http://localhost:8080'),\n    auth=(os.environ.get('CVAT_USER', ''), os.environ.get('CVAT_PASS', ''))\n)\nprint(f\"Logged in as {client.user}\")","lang":"python","description":"Initialize client with URL and credentials from environment variables."},"warnings":[{"fix":"Update imports: replace `from cvat_sdk.core.models import Task` with `from cvat_sdk.models import Task`.","message":"v2.x removed the deprecated `cvat_sdk.core` subpackage. Use `cvat_sdk.models` for data classes.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Change `Client('url', 'user', 'pass')` to `Client(url='url', auth=('user', 'pass'))`.","message":"`Client` constructor no longer accepts positional arguments for `auth`. Must pass as keyword or use `(user, pass)` tuple.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Open the file: `with open('image.jpg', 'rb') as f: client.tasks.upload_data(task_id, data=f)`.","message":"Image upload methods like `client.tasks.upload_data()` require a data stream or file-like object, not file path as string.","severity":"gotcha","affected_versions":"all"},{"fix":"Call `client.tasks.create(spec)` instead of `client.create_task(spec)`.","message":"`create_task()` method is deprecated; use `tasks.create()` instead.","severity":"deprecated","affected_versions":">=1.5.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change import to `from cvat_sdk.models import Task`.","cause":"v2.x removed the core subpackage; imports from cvat_sdk.core.models fail.","error":"ModuleNotFoundError: No module named 'cvat_sdk.core'"},{"fix":"Use keyword arguments: `Client(url='http://...', auth=('user', 'pass'))`.","cause":"Passing url and auth as positional arguments in v2.x.","error":"TypeError: Client.__init__() takes 1 positional argument but 3 were given"},{"fix":"Use `client.tasks.create(spec)`.","cause":"Deprecated method removed or not available in current version.","error":"AttributeError: 'Client' object has no attribute 'create_task'"},{"fix":"Verify resource ID and user access rights.","cause":"Trying to access a task or project that doesn't exist or insufficient permissions.","error":"cvat_sdk.exceptions.ApiException: Not Found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}