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) 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-2025.4.21.1.tar.gz (174.3 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-2025.4.21.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for visionfi_client-2025.4.21.1.tar.gz
Algorithm Hash digest
SHA256 f938f6a04644bfb089d6d329ef1c72721d1997065e840011bc195701fdee1da8
MD5 1039a497b4954ebaecaba55217b4ebe5
BLAKE2b-256 ee553e2be317e51ae4690c0650319e6a07023738fb02e6c36f0b000fbd658557

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for visionfi_client-2025.4.21.1-py3-none-any.whl
Algorithm Hash digest
SHA256 398e3450b9754294ac3d251ffd94018c161e05047cbbfcdf4ed918594e25de15
MD5 969f3d3a4ed4f35acd1df0d9500ec7c5
BLAKE2b-256 399acd9fc19c863e2303db19b23156c1286b5cbcf96b8ce6f18d241ff94b521b

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