Skip to main content

The Meibel API provides document parsing, datasource management, and AI agent orchestration. Read the docs at https://docs.meibel.ai to learn more.

Project description

Meibel Python SDK

The official Python SDK for the Meibel API. Provides document parsing, datasource management, and AI agent orchestration.

Installation

Install from Git (v2):

pip install git+https://github.com/meibel-ai/meibel-python.git@v2.0.0

Quick Start

from meibel import MeibelClient

client = MeibelClient(api_key="your-api-key")

# Parse a document
with open("document.pdf", "rb") as f:
    result = client.documents.parse_document(file=f)
    print(result.job_id)

# Process a document synchronously (waits for completion)
with open("document.pdf", "rb") as f:
    result = client.documents.process_document(file=f)
    print(result)

# List datasources
datasources = client.datasources.list_datasources()
for ds in datasources.items:
    print(ds.name)

Nested Resources

Resources are organized hierarchically. Content, downloads, data elements, and table descriptions are accessed through datasources:

# Upload content to a datasource
with open("data.csv", "rb") as f:
    result = client.datasources.content.upload_content(file=f, file_name="data.csv")

# List data elements
elements = client.datasources.data_elements.list_data_elements(datasource_id="ds-123")

Agent sessions (chat) are accessed through agents:

# Create a session and send a message
session = client.agents.sessions.create_session(agent_id="agent-123")
response = client.agents.sessions.send_chat_message(session_id=session.id, message="Hello")

Async Usage

from meibel import AsyncMeibelClient

client = AsyncMeibelClient(api_key="your-api-key")

result = await client.documents.process_document(file=open("doc.pdf", "rb"))

Documentation

License

MIT

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

meibel-2.0.1.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

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

meibel-2.0.1-py3-none-any.whl (49.3 kB view details)

Uploaded Python 3

File details

Details for the file meibel-2.0.1.tar.gz.

File metadata

  • Download URL: meibel-2.0.1.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for meibel-2.0.1.tar.gz
Algorithm Hash digest
SHA256 5af0e849f37e0bcd00c2fa05ea8c5f09787a56068c97af2a11e99fdaed81f882
MD5 649dd44120e48956c158de75744793ab
BLAKE2b-256 b53c97c9244d7a3f431bbfef66f0ab368762e4bddabbeafe6b8a844d701b2cd4

See more details on using hashes here.

File details

Details for the file meibel-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: meibel-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 49.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for meibel-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad6d9e2e186a96c5144b93c0fb7b0b3bccdaa038f4210fd948052bd81562fb4
MD5 dcfb1be677ca35905f65994488404db5
BLAKE2b-256 d231f68dc06aa554dac84e44286caef52111b8df0c20e95c5e5e0db32026bf7c

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