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.runTags(
    image = "path/to/my/image"
)

# caption image
captions = smartlens.runCaptions(
    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-1.0.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

smartlens-1.0.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smartlens-1.0.0.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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 687e0615beb3bdac7fef122bf427d7c68de3243e0a44e65c40c858b24229b281
MD5 088a69583ca9e1f81531202bb10ba5b3
BLAKE2b-256 c84d4c1663c299f242a93839724ada522629031fe0066a326a99c616f90f34db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: smartlens-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d138a9cd2080563a5de7460dda4bf46525ee63b1fe7b05ac69b54cac1635215e
MD5 787a72a574450e0737207fc304ba654c
BLAKE2b-256 cec60d72a026144c1bad629d869bf44e68d88a58ac77eccf5d3ff2130e3b1a48

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