{"id":27680,"library":"datalab-python-sdk","title":"Datalab Python SDK","description":"SDK for the Datalab document intelligence API. Current version 0.5.0, requires Python >=3.10. Released on a monthly cadence, still in early active development.","status":"active","version":"0.5.0","language":"python","source_language":"en","source_url":"https://github.com/datalab-ai/datalab-python-sdk","tags":["document-intelligence","api-sdk","machine-learning"],"install":[{"cmd":"pip install datalab-python-sdk","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"For HTTP API calls","package":"requests","optional":false}],"imports":[{"note":"","wrong":"","symbol":"DatalabClient","correct":"from datalab import DatalabClient"},{"note":"","wrong":"","symbol":"DatalabError","correct":"from datalab import DatalabError"}],"quickstart":{"code":"import os\nfrom datalab import DatalabClient\n\nclient = DatalabClient(api_key=os.environ.get('DATALAB_API_KEY', ''))\nresult = client.extract(\n    file_path='invoice.pdf',\n    document_type='invoice',\n    fields=['total', 'date', 'vendor']\n)\nprint(result)","lang":"python","description":"Initialize client with API key (set DATALAB_API_KEY environment variable) and extract fields from a document."},"warnings":[{"fix":"Update code to handle dict response: `result['fields']` instead of `result[0]`.","message":"In version 0.5.0, the `extract` method changed from returning a list to returning a dict.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Use `api_key='your_key'` instead of `token='your_token'`.","message":"`DatalabClient` constructor parameter `token` has been renamed to `api_key`.","severity":"deprecated","affected_versions":"<0.5.0"},{"fix":"Always use `DatalabClient(api_key='...')`.","message":"API key must be passed as a keyword argument, not positional.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install datalab-python-sdk` and check Python version >=3.10.","cause":"Library not installed or wrong Python environment.","error":"ImportError: cannot import name 'DatalabClient' from 'datalab'"},{"fix":"Replace `token=` with `api_key=`.","cause":"Using deprecated parameter name `token` (renamed in v0.5.0).","error":"TypeError: __init__() got an unexpected keyword argument 'token'"},{"fix":"Set environment variable `DATALAB_API_KEY` or pass `api_key='your_key'`.","cause":"No API key provided or key is empty string.","error":"ValueError: API key is required"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}