Skip to main content

Python SDK for Cradl

Project description

Python SDK for Cradl

Github Actions build status

Installation

$ pip install cradl

Usage

Sign up for free here and download API credentials to use this SDK. Read more about authenticating to the API here

Quick start

import json
from cradl import Client

client = Client()
models = client.list_models()['models'] # List all models available
model_id = models[0]['modelId'] # Get ID of first model in list
document = client.create_document('path/to/document.pdf')
prediction = client.create_prediction(document['documentId'], model_id=model_id)
print(json.dumps(prediction, indent=2))

Contributing

Prerequisites

$ pip install -r requirements.txt
$ pip install -r requirements.ci.txt

Run tests

$ make prism-start
$ python -m pytest

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

cradl-0.4.1.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

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

cradl-0.4.1-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file cradl-0.4.1.tar.gz.

File metadata

  • Download URL: cradl-0.4.1.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for cradl-0.4.1.tar.gz
Algorithm Hash digest
SHA256 3e6f2b44163d40f33da91c478085a83ea39a6f858e9f1061fb4e75ec8f049fb9
MD5 1f3700d70e0d0afad42958e837e7d08f
BLAKE2b-256 b48e2237f7b221ab09b6787d0df32a51f76694febce6f806da0c0f33498a8598

See more details on using hashes here.

File details

Details for the file cradl-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: cradl-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for cradl-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96a26f7de8d0c6d5a6dd6bef850d9cb6e0bb7f1a376040f27d3027fd4d48b176
MD5 5633e390413e14e269c5409b9a5aef3b
BLAKE2b-256 38f75d1049804b8af2c19a3a1b32ea313114b2c1f12d880dc3a96a83d5c02ae3

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