Skip to main content

smartextract Python SDK

Project description

smartextract Python SDK

PyPI - Version PyPI - Python Version

This package provides convenient access to the smartextract REST API for Python applications.

Installation

This package requires Python 3.9 or higher and is available from PyPI:

pip install smartextract

Usage

To make your first request to the smartextract API, first make sure that you have signed up at https://app.smartextract.ai/. Then, try the following:

import smartextract
client = smartextract.Client(username=YOUR_USERNAME, password=YOUR_PASSWORD)
info = client.get_user_info()
print(info)

You may also generate an API key and use it instead of your username and password to initialize the client.

For more information, use your IDE to explore the methods of the Client object or refer to the user guide.

CLI

This package also offers a command line interface. To enable a few additional CLI features, install it with:

pip install smartextract[cli-extras]

Then type, for instance

smartextract get-user-info

to make a request, and

smartextract --help

for more information on all available commands and switches.

To avoid typing your username and password every time, generate an API key and set your environment variable SMARTEXTRACT_API_KEY. Alternatively, you can use short-lived API tokens, for example like this:

export SMARTEXTRACT_API_KEY="$(smartextract login YOUR_USERNAME)"
# or, to avoid typing your password interactively
export SMARTEXTRACT_API_KEY="$(cat my-password.txt | smartextract login YOUR_USERNAME)"

Finally, see smartextract completion --help for instructions on how to set up command-line completion in your shell.

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

smartextract-0.4.tar.gz (61.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smartextract-0.4-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file smartextract-0.4.tar.gz.

File metadata

  • Download URL: smartextract-0.4.tar.gz
  • Upload date:
  • Size: 61.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for smartextract-0.4.tar.gz
Algorithm Hash digest
SHA256 3f4f8e6ac3ef5f8b05aae679f014c32e2df10a73661446d1320891226d598bc2
MD5 ed961508390fa9ccd0e0b8d19d0f81ea
BLAKE2b-256 94f2e845729a339a0abb809104eea5c1cd148a64dd7f3d8b3fd76afdf1defa65

See more details on using hashes here.

File details

Details for the file smartextract-0.4-py3-none-any.whl.

File metadata

  • Download URL: smartextract-0.4-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for smartextract-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 85ac2e964d9969ff8b11c918b850e1b3e453306cc95324d99271d22ea944ba9b
MD5 4b4412a7283a1ac17cb194b03ce4d05e
BLAKE2b-256 7f198ab3f08f7e4968b6fa677abf8a77aa9c967e53b5dca82300a6c41c8bd4e3

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