smartextract Python SDK
Project description
smartextract Python SDK
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file smartextract-0.2.tar.gz
.
File metadata
- Download URL: smartextract-0.2.tar.gz
- Upload date:
- Size: 61.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab4ae205998100170ca75e9cf8d08dcb5ae973f36bf1020306537026e26bbc23 |
|
MD5 | 2a1f7ea5423db68543b1118f7b3978af |
|
BLAKE2b-256 | 71ab2b12b1d46a6e3160d47d57921788ab0e77ca80b88f26cf006c3617f8a74d |
File details
Details for the file smartextract-0.2-py3-none-any.whl
.
File metadata
- Download URL: smartextract-0.2-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5d06dfcd21527110d22bae9231a6b3d21aca15693b0dec386c9970cec26f0eb |
|
MD5 | 545d86017d75778d5384bb680e3e4a66 |
|
BLAKE2b-256 | 1e65ad4cc46c12b355cce079a47d153f9c2145216d2d6418e7dbdc6ce44eb8f9 |