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
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.5.tar.gz
(45.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
meibel-2.0.5-py3-none-any.whl
(59.3 kB
view details)
File details
Details for the file meibel-2.0.5.tar.gz.
File metadata
- Download URL: meibel-2.0.5.tar.gz
- Upload date:
- Size: 45.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d9ea0af175cb3c7d920a71e032712228682b808eae8f6d86d595206d97377f5
|
|
| MD5 |
df0a0b6cb989ed002854820f056d1255
|
|
| BLAKE2b-256 |
100b2e8b4d4f8ff28eba2599a45d75dff27744a6ff1ad0f2394f042ed4ac0727
|
File details
Details for the file meibel-2.0.5-py3-none-any.whl.
File metadata
- Download URL: meibel-2.0.5-py3-none-any.whl
- Upload date:
- Size: 59.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16b79fd523f9ee34477971aebb290f9b4f0bce9c037a4cf235565d5a3a9ebc7f
|
|
| MD5 |
ff711e7d7a8a6bec4ffde03f28a4e3bf
|
|
| BLAKE2b-256 |
704aeef517a31a1ebf8f9ca6374143064ce259b0dac7531fc53d4b1212c3a866
|