SDK for the Datalab document intelligence API
Project description
Datalab SDK
A Python SDK for the Datalab API - a document intelligence platform powered by marker and surya.
See the full documentation at https://documentation.datalab.to.
Installation
pip install datalab-python-sdk
Quick Start
Authentication
Get your API key from https://www.datalab.to/app/keys:
export DATALAB_API_KEY="your_api_key_here"
Basic Usage
from datalab_sdk import DatalabClient
client = DatalabClient() # use env var from above, or pass api_key="your_api_key_here"
# Convert PDF to markdown
result = client.convert("document.pdf")
print(result.markdown)
# OCR a document
ocr_result = client.ocr("document.pdf")
print(ocr_result.pages) # Get all text as string
CLI Usage
The SDK includes a command-line interface:
# Convert document to markdown
datalab convert document.pdf
# OCR with JSON output
datalab ocr document.pdf --output-format json
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datalab_python_sdk-0.1.7.tar.gz.
File metadata
- Download URL: datalab_python_sdk-0.1.7.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91d19ec375f61361637da2a2f251ef2317e175f0893f761f121d0cd449c6d1cc
|
|
| MD5 |
71c6960bc1b9ae2cd1270dffd4ec1128
|
|
| BLAKE2b-256 |
ab772344903872b1e5cc29b8d1a4750d93f05f0c7804c107d1cc7d19ca36f114
|
File details
Details for the file datalab_python_sdk-0.1.7-py3-none-any.whl.
File metadata
- Download URL: datalab_python_sdk-0.1.7-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7461e2b004f1f1c8449a541a29b7d84968073c4b803666b50810c33200986faf
|
|
| MD5 |
18a091cde1521695a407c1ea3555ad0e
|
|
| BLAKE2b-256 |
026ec792afa6e6f6b653be779b8d30335802e1f9f6cb0879a66c3739ed198e5d
|