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.8.tar.gz (34.2 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.8-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cradl-0.4.8.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for cradl-0.4.8.tar.gz
Algorithm Hash digest
SHA256 84bbeedb5ec946cf652076db2682107d6230718d60c86ca8b002d5091d08e9b1
MD5 9e63de055978c1477ffb08a4148224f1
BLAKE2b-256 5669a09d98448a1a2b58c8e38ad3e547e0450e697e8b5f02b12b3f4417c42e4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cradl-0.4.8-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for cradl-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3928d14673edbc0b5912ba2923cb4b37a8b6847de7d77d49a26b91b2056ee9dd
MD5 4c01ad9ba84f5a644ff2c56e4b5288fa
BLAKE2b-256 510a34b892e152bffa928d034cad37a839795dad92745af988cd1a22894fd9d5

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