Client class provides session management, authentication, and access to CVAT server APIs.
Creating a Client
Basic Initialization
"cvat.example.com"- Auto-detects HTTPS/HTTP"https://cvat.example.com"- Explicit HTTPS"http://localhost:8080"- Explicit HTTP with port
Using make_client Helper
Themake_client function provides a convenient way to create and authenticate a client:
Authentication
The SDK supports two authentication methods: password-based and token-based.Password Authentication
Authenticate with username and password:Token Authentication
Authenticate with a Personal Access Token (PAT):Checking Authentication Status
Logging Out
Configuration
Customize client behavior with theConfig class:
Configuration Options
float
default:"5"
Interval in seconds between status checks for long-running operations (uploads, exports, etc.)
bool
default:"True"
Whether to allow connection to unsupported CVAT server versions. If
False, raises IncompatibleVersionException.bool | None
default:"None"
SSL certificate verification. Set to
False to disable (not recommended for production).Path
default:"~/.cache/cvat-sdk"
Directory for caching server data (used by datasets and PyTorch adapters).
Context Manager
Use the client as a context manager for automatic cleanup:API Access
The client provides access to various CVAT resources through repository properties:Tasks Repository
Projects Repository
Jobs Repository
Users Repository
Organizations Repository
Issues and Comments
Organization Context
Set an organization context for all operations:Low-Level API Access
Access the underlying auto-generated API client:Server Version Checking
The SDK checks server version compatibility on initialization:Waiting for Long Operations
Some operations (uploads, exports) are asynchronous. Usewait_for_completion to wait for them:
Logging
The client uses Python’s standard logging module:API URL Construction
The client provides URL construction utilities:Exception Handling
Next Steps
- Core Operations - Working with projects, tasks, and jobs
- PyTorch Adapter - Use CVAT data for training
- Auto-Annotation - Automate annotations with models