Skip to main content

Document Insighter Python Client

Project description

Document Insighter Python Client

document-insighter is a set of tools that enables developers to interactive with Document Insighter API, like query extraction results.

Installation

pip install document-insighter

Getting Started

Configure ENV variables

# Client application credentials
INSIGHTER_CLIENT_IDP=xxxx
INSIGHTER_CLIENT_ID=xxxx
INSIGHTER_CLIENT_SECRET=xxxx

# Client access token file path
INSIGHTER_CLIENT_TOKEN_PATH=insighter_token.json

Fetch Token

from document_insighter.api_client import DocumentInsighter
from document_insighter.model import Env

# Change to Env.PRODUCTION for production
document_insighter = DocumentInsighter(Env.STAGING)
document_insighter.fetch_token()

Query Extractions

from datetime import datetime

pages_generator = document_insighter.query_extractions_pages(datetime(2022, 4, 13), datetime(2022, 5, 17), page_size=50)
extractions = [x for x in page for page in pages_generator]

License

MIT

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

document-insighter-0.0.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

document_insighter-0.0.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file document-insighter-0.0.3.tar.gz.

File metadata

  • Download URL: document-insighter-0.0.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for document-insighter-0.0.3.tar.gz
Algorithm Hash digest
SHA256 8aece101324aea3c949ecf2e774fc76df42a87fb085225d3dde558faaab45c44
MD5 ca16b6769544eb0a9f69ace5d955803c
BLAKE2b-256 ef3cb3ee2c9f1e830a85b91a2343651e8d7191f6c912b7c586061309c6354d9b

See more details on using hashes here.

File details

Details for the file document_insighter-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for document_insighter-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7c5c420ebf8742c236c7628d6a3df9959c7968b23e0117d3115c38995639682b
MD5 cabdd975efc3dbd9534f21d5da07defd
BLAKE2b-256 eb556c68aaa2c9a72778b9ef7c5e3d566da4e7b8b659c204bec893efc576f35c

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