Skip to main content

Python client library for the VisionFi document analysis platform

Project description

VisionFi Python Client

A Python client library for the VisionFi document analysis platform.

Note: This package is a wrapper for the VisionFi API, which is a subscription service. A valid service account is required to use this package with the VisionFi API. Contact VisionFi for subscription details and to obtain your service account credentials.

Installation

pip install visionfi-client

Basic Usage

from visionfi import VisionFi
import pathlib

# Initialize client
client = VisionFi(service_account_path='./service-account.json')

# Check authentication
auth_result = client.verify_auth()
print(f"Authentication successful: {auth_result.data}")

# Get client information
client_info = client.get_client_info()
if client_info.success:
    print(f"Client name: {client_info.data.name}")
    print(f"Client status: {client_info.data.status}")

# Analyze a document
with open('document.pdf', 'rb') as f:
    file_data = f.read()

job = client.analyze_document(file_data, {
    'file_name': 'document.pdf',
    'analysis_type': 'auto_loan_abstract'
})

print(f"Analysis job created: {job.uuid}")

# Get results (with polling)
results = client.get_results(
    job.uuid,
    poll_interval=5000,  # 5 seconds
    max_attempts=30,     # Up to 2.5 minutes
    early_warning_attempts=5
)

if results.status == 'processed':
    print("Analysis processed successfully!")
    print(f"Results: {results.results}")

Features

  • Authentication with Google service accounts
  • Document analysis submission
  • Results retrieval with polling
  • Client information and workflow retrieval
  • Comprehensive error handling

License

MIT

Acknowledgments

This package includes components licensed under Apache License 2.0 and MIT License. It builds on industry-standard libraries (requests, pydantic, google-auth, opencv-python) with hundreds of millions of monthly downloads.

See ACKNOWLEDGMENTS.md for statistics and NOTICE.txt for licensing details.

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

visionfi_client-0.1.1.tar.gz (174.4 kB view details)

Uploaded Source

Built Distribution

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

visionfi_client-0.1.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file visionfi_client-0.1.1.tar.gz.

File metadata

  • Download URL: visionfi_client-0.1.1.tar.gz
  • Upload date:
  • Size: 174.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for visionfi_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b6ea1c2eb5e33fb65da16e877870c30851c2df377d3d93b2765266d28ff1f98a
MD5 6a11612cf97d0a3ad7406e4cfbccbaa1
BLAKE2b-256 0cdc3fd6616835ff23452681eb13d8ca6e1748e2d92c92e0c9b34488a928f319

See more details on using hashes here.

File details

Details for the file visionfi_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for visionfi_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53ba01b3ac88b0b080f12855f4127ac3c1575fedb453747bbd64cbc1f369ec5a
MD5 2a832c696e3894cc4ce55f5273785717
BLAKE2b-256 8fc0f274b8611e20ec15f19f0e1b7a3ace57667f524e9902385db4dc17059199

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