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.2.tar.gz (33.7 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.2-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cradl-0.4.2.tar.gz
  • Upload date:
  • Size: 33.7 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.2.tar.gz
Algorithm Hash digest
SHA256 088d532d62406cf7e6ea45702922b38c5fc13e4e75d0785e9f41d18b87e4200a
MD5 9d4105101eba57d955f7ab5acef84328
BLAKE2b-256 a8b9b6e9224d039da32e85b3feb250f8612e6d4afaacd60ec3a32fbb19be40fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cradl-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 25.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d06c73319e583f8a7b54b71b519f5005399c490927ee05e92a713382fc455a51
MD5 7bda3e06755d156296ea1be8e35bbbe7
BLAKE2b-256 441327c2a49476b1122a94f1a0933525fdeba327fc4c65c4bbb2977b900e7b43

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