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

Uploaded Python 3

File details

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

File metadata

  • Download URL: datalab_python_sdk-0.1.8.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.8.tar.gz
Algorithm Hash digest
SHA256 69c6538b37012ead6445938faa99d0fcb472ebeab139a7d203dc0fcbefbedbf3
MD5 17dfb01c845eb2257ef562f7022e5276
BLAKE2b-256 e037fe8fddbfd39e49a05d57e7db5a1ea2d2ced11ff26a78841a51008b583305

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for datalab_python_sdk-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 972cfaf9ab79ed7b7f907a1b0f7ae3cefcf5c70616362c6508f8a506a2345f90
MD5 8d62eb6343f60117f11465a4c1c5d360
BLAKE2b-256 451de446fb226ddd249c92e048df968809219ce1659d0c36265f25ef1ce406fc

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