Skip to main content

Python client for the Simba Knowledge management System

Project description

Simba Client (formerly simba_sdk)

A Python client for interacting with the Simba document processing API.

Installation

Using pip

pip install simba-client

Development Installation

# Clone the repository
git clone https://github.com/GitHamza0206/simba.git
cd simba

# Install dependencies with Poetry
poetry install

Quick Start

from simba_sdk import SimbaClient

# Initialize the client
client = SimbaClient(
    api_url="https://your-api.example.com",
    api_key="your-api-key"
)

# Upload a document
with open("document.pdf", "rb") as f:
    result = client.documents.create_from_file(f, "document.pdf")
    document_id = result["document_id"]

# Parse a document synchronously
parsing_result = client.parser.parse_sync(document_id)

# Parse a document asynchronously
task = client.parser.parse(document_id)
task_id = task["task_id"]

# Check the status of a parsing task
task_status = client.parser.get_task(task_id)

# Generate an embedding for semantic search
embedding_result = client.embedding.embed_document(document_id)

# Perform a similarity search
search_results = client.embedding.get_similarity_search(
    document_id, 
    "financial projections for next quarter",
    limit=3
)

Features

  • Document Management: Upload, download, list, and delete documents
  • Document Parsing: Extract structured data from documents, including tables, forms, and entities
  • Document Embeddings: Generate vector embeddings for documents to enable semantic search
  • Authentication: Secure API access with API keys
  • Error Handling: Robust error handling for API requests

Documentation

For more detailed information, check out the documentation:

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/yourusername/simba-client.git
cd simba-client

# Install dependencies with Poetry
poetry install

Run Tests

poetry run pytest

Build Documentation

poetry run sphinx-build docs/source docs/build

License

This project is licensed under the MIT License.

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

simba_client-0.2.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

simba_client-0.2.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file simba_client-0.2.1.tar.gz.

File metadata

  • Download URL: simba_client-0.2.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.5 Darwin/24.3.0

File hashes

Hashes for simba_client-0.2.1.tar.gz
Algorithm Hash digest
SHA256 3161c9d787c23eb3ad6a2a661d2b8059bed9fc95031e74262f231fdc1e0c514c
MD5 28bc8900c73b6f09ec3d0e606c10fe0a
BLAKE2b-256 2fbbfc02ce4c36d51b7e79eceb1e158082756b189377d911ae522c6f92e8a735

See more details on using hashes here.

File details

Details for the file simba_client-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: simba_client-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.5 Darwin/24.3.0

File hashes

Hashes for simba_client-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4d2143dbb9212c2cbeb6f0856f69765163bbe2aff21d5e92f554d35ad95b6d7
MD5 19f1434414b1d2176a466308394a3a81
BLAKE2b-256 68f2e6b7de4574a081e376e8e6913413670348b416561056dc8a7d81cea9a61a

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