Lazarus AI Python Library
Project description
Lazarus Forms API Python Library
Installation
To install
pip install lazarus_ai
To upgrade
pip install lazarus_ai --upgrade
Usage
We recommend storing your Lazarus auth credentials as environment variables.
# example .env file
ORG_ID=ORG_ID_HERE
AUTH_KEY=AUTH_KEY_HERE
LazarusAuth
Before using Lazarus Forms or RikAI, you must authenticate using the LazarusAuth class. This auth object will be passed to Forms and RikAI class instantiations.
auth = LazarusAuth("ORG_ID_HERE", "AUTH_KEY_HERE")
Forms
Upload a document using a file URL, a base64 encoded string, or a local file path. Run the standard OCR model on that document.
forms = Forms(auth)
forms.run_ocr("URL", "FILE_URL_HERE")
forms.run_ocr("BASE64", "BASE_64_STRING_HERE")
forms.run_ocr("FILE_PATH", "FILE_PATH_HERE")
Run a custom OCR model.
forms = Forms(auth, "CUSTOM_MODEL_ID_HERE")
forms.run_ocr("URL", "FILE_URL_HERE")
forms.run_ocr("BASE64", "BASE_64_STRING_HERE")
forms.run_ocr("FILE_PATH", "FILE_PATH_HERE")
RikAI
Upload a document using a file URL, a base64 encoded string, or a local file path. Run RikAI on that document.
rikai = RikAI(auth)
question = "QUESTION_HERE"
rikai.ask_question("URL", "FILE_URL_HERE", question)
rikai.ask_question("BASE64", "BASE_64_STRING_HERE", question)
rikai.ask_question("FILE_PATH", "FILE_PATH_HERE", question)
Run a custom RikAI model on that document.
rikai = RikAI(auth, "CUSTOM_MODEL_ID_HERE")
question = "QUESTION_HERE"
rikai.ask_question("URL", "FILE_URL_HERE", question)
rikai.ask_question("BASE64", "BASE_64_STRING_HERE", question)
rikai.ask_question("FILE_PATH", "FILE_PATH_HERE", question)
Run the RikAI summarizer on the document.
rikai = RikAI(auth, "CUSTOM_MODEL_ID_HERE")
fields = {"document_type": "TYPE_HERE", "summary_description": "DESCRIPTION_HERE"}
rikai.summarize("URL", "FILE_URL_HERE", fields)
rikai.summarize("BASE64", "BASE_64_STRING_HERE", fields)
rikai.summarize("FILE_PATH", "FILE_PATH_HERE", fields)
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
File details
Details for the file lazarus-ai-1.0.1.tar.gz
.
File metadata
- Download URL: lazarus-ai-1.0.1.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bf9fd3b7865a93d14f7078fad715d16379c93bc7e68e3ac56ffefeba44f5184 |
|
MD5 | 816ff56b114f4f323ea0282d45b06f9a |
|
BLAKE2b-256 | a4f7161d39ffcc414a4b56b96dbfdca4cd9940fe4d75fc2e77bd0ced7b0407e3 |