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.
pip install datalab-python-sdkGet your API key from https://www.datalab.to/app/keys:
export DATALAB_API_KEY="your_api_key_here"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)Workflows allow you to chain multiple document processing steps together. Each workflow consists of one or more steps that can depend on previous steps.
Note: All workflow operations require authentication. Make sure you have set your DATALAB_API_KEY environment variable or pass api_key when creating the client (see Authentication section above).
For more Workflow tips, see our documentation.
The SDK includes a command-line interface:
# Convert document to markdown
datalab convert document.pdf
# Workflow commands
datalab create-workflow --help
datalab execute-workflow --help
datalab get-execution-status --help
datalab list-workflows --help
datalab get-workflow --help
datalab visualize-workflow --helpMIT License