Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datalab_python_sdk-0.1.7.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datalab_python_sdk-0.1.7-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

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

Hashes for datalab_python_sdk-0.1.7.tar.gz
Algorithm Hash digest
SHA256 91d19ec375f61361637da2a2f251ef2317e175f0893f761f121d0cd449c6d1cc
MD5 71c6960bc1b9ae2cd1270dffd4ec1128
BLAKE2b-256 ab772344903872b1e5cc29b8d1a4750d93f05f0c7804c107d1cc7d19ca36f114

See more details on using hashes here.

File details

Details for the file datalab_python_sdk-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for datalab_python_sdk-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7461e2b004f1f1c8449a541a29b7d84968073c4b803666b50810c33200986faf
MD5 18a091cde1521695a407c1ea3555ad0e
BLAKE2b-256 026ec792afa6e6f6b653be779b8d30335802e1f9f6cb0879a66c3739ed198e5d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page