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.6.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.6-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file datalab_python_sdk-0.1.6.tar.gz.

File metadata

  • Download URL: datalab_python_sdk-0.1.6.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.17

File hashes

Hashes for datalab_python_sdk-0.1.6.tar.gz
Algorithm Hash digest
SHA256 fdc0523d3b18bc53807fe0373517125ac5c78279e8434eacaa6d027d59f1249a
MD5 10a19705cfead1c66f0397af2efc1149
BLAKE2b-256 124ecfd6f1a088bbc6e6a243378a4931493fac0e7d36dca520abca8150c9e4f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for datalab_python_sdk-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3377361f81d37e360615434a8f827775cd342ed00514e625fed0d28d67dd0a09
MD5 ee9944615912099dbcca25306dea3571
BLAKE2b-256 c2e566d3bb90cd046b8e6937ea77b0d6db72f5beba786bc5a57026d405e2ff2a

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