{"id":28174,"library":"segments-ai","title":"Segments.ai Python SDK","description":"Official Python client for the Segments.ai annotation platform. Enables dataset management, sample upload/download, annotation export, and integration with labeling workflows. Current version 1.25.0, release cadence approximately monthly.","status":"active","version":"1.25.0","language":"python","source_language":"en","source_url":"https://github.com/segments-ai/segments-ai","tags":["segments-ai","annotation","dataset","labeling"],"install":[{"cmd":"pip install segments-ai","lang":"bash","label":"default"}],"dependencies":[],"imports":[{"note":"Use explicit import to avoid attribute confusion.","wrong":"import segments","symbol":"SegmentsClient","correct":"from segments import SegmentsClient"},{"note":"Dataset is not exported; use SegmentsDataset.","wrong":"from segments import Dataset","symbol":"SegmentsDataset","correct":"from segments import SegmentsDataset"}],"quickstart":{"code":"from segments import SegmentsClient\nimport os\n\nclient = SegmentsClient(api_key=os.environ.get('SEGMENTS_API_KEY', ''))\n# List datasets\ndatasets = client.get_datasets()\nprint(datasets)","lang":"python","description":"Initialize client and list datasets."},"warnings":[{"fix":"Remove any usage of SegmentsClient with Hugging Face Hub; use direct API key authentication instead.","message":"In version 1.20.0, Hugging Face integration was dropped. Any code relying on huggingface_hub integration will break.","severity":"breaking","affected_versions":"<1.20.0 (removed in >=1.20.0)"},{"fix":"Use `from segments import SegmentsClient` instead of `from segments import Client`.","message":"The `Client` class was renamed to `SegmentsClient` in v1.0.0. `Client` may be removed in future.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Implement exponential backoff or limit concurrency. The SDK raises `RateLimitError` (version >=1.20.0).","message":"Rate limiting is enforced. Scripts that make many parallel requests may hit 429 errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.25.0':26 'ai':33 'annot':10,17,34 'approxim':29 'cadenc':28 'client':6 'current':24 'dataset':13,35 'enabl':12 'export':18 'integr':20 'label':22,36 'manag':14 'month':30 'offici':4 'platform':11 'python':2,5 'releas':27 'sampl':15 'sdk':3 'segment':32 'segments-ai':31 'segments.ai':1,9 'upload/download':16 'version':25 'workflow':23","created_at":"2026-05-09T05:54:07.329159+00:00","updated_at":"2026-05-09T05:54:07.329159+00:00","problems":[{"fix":"Run `pip install segments-ai` in your current Python environment.","cause":"Package not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'segments'"},{"fix":"Pass a valid API key via `SegmentsClient(api_key='your-api-key')` or set the `SEGMENTS_API_KEY` environment variable.","cause":"Missing or incorrect API key passed to SegmentsClient.","error":"segments.exceptions.AuthenticationError: Invalid API key"},{"fix":"Remove `hub_token` argument. Use `SegmentsClient(api_key=...)` instead.","cause":"Hugging Face Hub token argument is no longer supported as of v1.20.0.","error":"TypeError: __init__() got an unexpected keyword argument 'hub_token'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://segments.ai/","github":"https://github.com/segments-ai/segments-ai","docs":null,"changelog":null,"pypi":"https://pypi.org/project/segments-ai/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"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}}