Skip to main content

ByteIT Python SDK

ByteIT is a Python client for document parsing and structured extraction. Use it to submit files, retrieve parsed content, and extract schema-based data from completed parse jobs.

Installation

pip install byteit

Requires Python 3.8+ and a ByteIT API key.

Quick Start

from byteit import ByteITClient

client = ByteITClient(api_key="your_api_key")
result = client.parse("document.pdf")
print(result.decode("utf-8"))

parse() returns raw bytes. Pass output="result.json" to write the result directly to disk.

Parse Documents

from byteit import ByteITClient, ProcessingOptions

client = ByteITClient(api_key="your_api_key")

result = client.parse(
    "invoice.pdf",
    processing_options=ProcessingOptions(languages=["en"], page_range="1-2"),
)

Public parse submission methods always request JSON output internally. If you need another format, request it when downloading an async result.

Async Workflow

job = client.parse_async("document.pdf")

status = client.get_job_status(job.id)
details = client.get_parse_job_details(job.id)

if status.is_completed:
    result_json = client.get_parse_job_result(job.id)
    result_txt = client.get_parse_job_result(job.id, result_format="txt")

Available parse-job methods:

Method Purpose
get_parse_jobs() List parse jobs
get_parse_job_details(job_id) Get full parse-job details
get_job_status(job_id) Check lightweight processing status
get_parse_job_result(job_id, result_format=None) Download parse result

Structured Extraction

Extraction runs on a completed parse job and returns a dictionary matching your schema.

from byteit import ByteITClient, ExtractionSchema
from pydantic import Field


class InvoiceSchema(ExtractionSchema):
    invoice_number: str | None = Field(description="Invoice number")
    total_amount: str | None = Field(description="Total amount")


client = ByteITClient(api_key="your_api_key")
parse_job = client.parse_async("invoice.pdf")

result = client.extract(
    parse_job.id,
    InvoiceSchema,
    extraction_complexity="medium",
)

Async extraction is also available:

extract_job = client.extract_async(parse_job.id, InvoiceSchema)

status = client.get_job_status(extract_job.id)
if status.is_completed:
    extracted = client.get_extract_job_result(extract_job.id)

Available extraction methods:

Method Purpose
extract(parse_job_id, schema, output=None, extraction_complexity="medium") Run extraction and wait for the result
extract_async(parse_job_id, schema, extraction_complexity="medium") Submit extraction without waiting
get_extract_jobs() List extraction jobs
get_extract_job_details(job_id) Get full extraction job details
get_extract_job_result(job_id) Download extraction result

Processing Options

You can pass either a ProcessingOptions instance or a plain dictionary.

result = client.parse(
    "document.pdf",
    processing_options={
        "languages": ["de", "en"],
        "page_range": "1-5",
        "extraction_type": "complex",
    },
)

Error Handling

All SDK exceptions inherit from ByteITError.

from byteit.exceptions import (
    AuthenticationError,
    ByteITError,
    JobProcessingError,
    RateLimitError,
    ValidationError,
)

try:
    result = client.parse("document.pdf")
except AuthenticationError:
    print("Invalid API key")
except ValidationError as exc:
    print("Invalid request:", exc.message)
except RateLimitError:
    print("Rate limit exceeded")
except JobProcessingError as exc:
    print("Processing failed:", exc.message)
except ByteITError as exc:
    print("ByteIT error:", exc.message)

Supported Inputs

Common supported inputs include PDF, Word, PowerPoint, HTML, Markdown, plain text, JSON, XML, and common image formats such as PNG, JPEG, TIFF, and BMP.

Notebook Behavior

When running in Jupyter, parse results are automatically displayed as JSON when possible. Pass output=... if you want to suppress inline display and save the response directly.

Resources

Licensed under Apache 2.0. © 2026 ByteIT GmbH.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

byteit-1.1.2.tar.gz (40.8 kB view details)

Uploaded Source

Built Distribution

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

byteit-1.1.2-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file byteit-1.1.2.tar.gz.

File metadata

  • Download URL: byteit-1.1.2.tar.gz
  • Upload date:
  • Size: 40.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for byteit-1.1.2.tar.gz
Algorithm Hash digest
SHA256 42f3fccfad55f45a33b078f2fc2f0c9cf11846f584a23aa2e5e5f11be8429ea8
MD5 8fce930600cad56acfdd6f914a55865c
BLAKE2b-256 e916fedb9de75a0e3007616f7a8b18367014c3ed79e495b4f4bb68f9e4688392

See more details on using hashes here.

File details

Details for the file byteit-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: byteit-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for byteit-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 88ed592d00b8ffbbdb268ef54c758a1c500478c21e44c524cffad000ef6cfc3e
MD5 f8a4998083bf94becdb041f50c08e8f2
BLAKE2b-256 b8684c91234299626cc4c2dc30fca4a9f0e2423a41218de4ddb7adbb9835b22b

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.0

2 files

1.2.0

2 files

This release

1.1.2 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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