Skip to main content

Koncile Python SDK

The official Python SDK for Koncile, providing a seamless interface to interact with the Koncile API.

Features

  • Authentication and API key management
  • File operations (upload, download, manage)
  • Task management and status tracking
  • Folder organization
  • Template handling
  • Field configuration
  • Instruction management
  • Document operations

Installation

You can install the Koncile SDK using pip:

pip install koncile

For development installation, we recommend using a virtual environment (optional but recommended to avoid dependency conflicts):

# Create and activate virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # On Windows use: .\venv\Scripts\activate

# Install the package
pip install koncile

Quick Start

import time
from typing import List
from koncile_sdk.client import KoncileAPIClient
from koncile_sdk.clients.tasks import TaskStatus

# Initialize the client
client = KoncileAPIClient(
    api_key="your_api_key"
)

# Upload multiple files and get task IDs
files = [
    "./invoices/invoice1.pdf",
    "./invoices/invoice2.pdf"
]

upload_response = client.files.upload(
    folder_id="folder_id",
    template_id="template_id",
    file_paths=files
)

# Get task IDs from the upload response
task_ids: List[str] = upload_response['task_ids']

# Poll for task completion
completed_tasks = []
while len(task_ids) != len(completed_tasks):
    for i, task_id in enumerate(task_ids):
        if i not in completed_tasks:
            response = client.tasks.fetch_tasks_results(task_id)
            
            # Check if task is complete
            if response["status"] != TaskStatus.IN_PROGRESS.value:
                completed_tasks.append(i)
                
                if response["status"] == TaskStatus.DONE.value:
                    print(f"Task {task_id} completed successfully")
                    print("Results:", response["results"])
                elif response["status"] == TaskStatus.FAILED.value:
                    print(f"Task {task_id} failed")
                elif response["status"] == TaskStatus.DUPLICATE.value:
                    print(f"Task {task_id} detected as duplicate")
    
    if len(task_ids) != len(completed_tasks):
        time.sleep(1)  # Wait before next polling iteration

Documentation

For detailed API documentation and guides, visit docs.koncile.ai.

Support

For support inquiries, please contact support@koncile.ai.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

© 2025 Koncile. All rights reserved.

Metadata

Release files for koncile 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for koncile 0.1.0
File Size Uploaded Provenance Actions
koncile-0.1.0.tar.gz 17.7 kB Without provenance Details for koncile-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for koncile 0.1.0
File Interpreter ABI Platform Actions
koncile-0.1.0-py3-none-any.whl Python 3 none any Details for koncile-0.1.0-py3-none-any.whl

Total release size: 43.3 kB

Release files / koncile-0.1.0.tar.gz

Download URL koncile-0.1.0.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
90b570e308fbee1508854cafcd6b587975d03b9e51f17ce32f1857439ae60e1b
BLAKE2b-256 checksum
How to use checksums
a2640497d2fd97962b885928080be2ba582ae25654638e48a65b3e983b13e336
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / koncile-0.1.0-py3-none-any.whl

Download URL koncile-0.1.0-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94e4c08842819f84e2866e44193ab06a18b2a8021102128c0225ae1105edc55e
BLAKE2b-256 checksum
How to use checksums
cf9abbab8f665add3aefeb06c1b43a2587a3a1c68a2876d704ed683cffb1b023
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Security for koncile 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page