Skip to main content

A Python library for the SmartLens API.

Project description

SmartLens Python Library

The SmartLens Python library provides convenient access to the SmartLens API from applications written in the Python language. Integrate state-of-the-art AI into your application in just five lines of code.

Documentation

See the API docs.

Installation

To install the package, simply run:

pip install smartlens

Requirements

  • Python 3.6+

Usage

The library needs to be configured with your account's API key which is available in the SmartLens Dashboard. Set smartlens.api_key to its value:

import smartlens
smartlens.api_key = "YOUR-API-KEY"

# tag image
tags = smartlens.tagImage(
    image = "path/to/my/image"
)

# caption image
captions = smartlens.captionImage(
    image = "path/to/my/image"
)

# process document
extractedItems = smartlens.runDocumentAI(
    document = "path/to/my/document",
    customExtractions = [{'natural_language_query': 'What is the salary?', 'answer_key': 'employee_salary'}] # Custom extractions are optional
)

# process text document
extractedItems = smartlens.runTextAnalysis(
    text = "path/to/my/text",
    customExtractions = [{'natural_language_query': 'What is the salary?', 'answer_key': 'employee_salary'}] # Custom extractions are optional
)

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

smartlens-0.9.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

smartlens-0.9.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file smartlens-0.9.1.tar.gz.

File metadata

  • Download URL: smartlens-0.9.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for smartlens-0.9.1.tar.gz
Algorithm Hash digest
SHA256 2f349d1259bfb8c6511b3e3150897c5c654bd9ae2a82f43c85be8a7bb1c1aa91
MD5 5b06e4bbc1d99a746341e9f01bdef098
BLAKE2b-256 69ae9e967d458fd5a66786d27610085500a01ed41ccc012244d29b640cab64bd

See more details on using hashes here.

File details

Details for the file smartlens-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: smartlens-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for smartlens-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c332fc54a22b274dfd70babc18ab5c4e5b0f27483962baeae3ab90cf281836a
MD5 03c155ea35c07f3eaa9d7416570803a0
BLAKE2b-256 27e6dc0c87b23efcab35d564559d47b9e79954ff316800a30eeaf7caa1b94e1c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page