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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for datalab_python_sdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4798469eb4ce91770597c017052ffbefa9864bb2c66f2c7bb5c16fa5f85bb1af
MD5 3f17b9fa0ddb30f968c548b9455b8e24
BLAKE2b-256 e053bb4a90af072218ca83165a23baa30713020e4e32b73a069691a2eb49f0e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for datalab_python_sdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9c9dc9389bb37675f4fd946b794f9f678fc1e54116057937ecab7d6be09cee1f
MD5 ef387db03711e3af3b6cc0a5722ebb8f
BLAKE2b-256 ed26a6211f817e6b09053cae816789b86b2a006fdf59a4f8e5e07026cded29d3

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