Async client for SVO semantic chunker microservice.
Project description
svo-client
Async Python client for the SVO semantic chunker. Canonical API: SvoChunkerClient (adapter / JsonRpcClient only).
Install
pip install -e .
# or: pip install svo-client
Quick start
import asyncio
from svo_client import SvoChunkerClient
async def main():
async with SvoChunkerClient(
protocol="mtls",
host="127.0.0.1",
port=8009,
cert="mtls_certificates/client/svo-chunker.crt",
key="mtls_certificates/client/svo-chunker.key",
ca="mtls_certificates/ca/ca.crt",
check_hostname=False,
) as client:
chunks = await client.chunk(
text="Your text.",
chunk_type="Draft",
language="en",
)
print(len(chunks))
asyncio.run(main())
CLI: svo-client or python -m svo_client — thin wrapper; local file chunking orchestration is file_chunk_from_local_path in svo_client.file_processor. Text chunking: chunk (default) and chunk text; file chunking: chunk file or file-chunk (alias); ws prints inbound WebSocket JSON lines to stdout. --help lists all flags. RPC discovery: svo-chunker (list / help / run).
Configuration precedence (CLI → SVO_CHUNKER_CLIENT_* → JSON), --config, and CLI details (ws, --quiet-status, file-chunk status on stderr): svo_client/README.md.
Tests
.venv/bin/python -m pytest tests/ -q
Live integration (chunker on 127.0.0.1:8009): port must be listening or free for managed spawn; see tests/conftest.py.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file svo_client-3.0.1.tar.gz.
File metadata
- Download URL: svo_client-3.0.1.tar.gz
- Upload date:
- Size: 58.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3bcffca08ca3a2206ae576754e8de51509ab9aa8dcb930c283e96b87300c670c
|
|
| MD5 |
175c91b3e9102f821eb2a6589b170a20
|
|
| BLAKE2b-256 |
7aa421ebb79bbe59fa6f845274a7ad4685576fbc843efab4a79e812a389c67fe
|
File details
Details for the file svo_client-3.0.1-py3-none-any.whl.
File metadata
- Download URL: svo_client-3.0.1-py3-none-any.whl
- Upload date:
- Size: 76.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db8c9f20ef27d1556f9a4126c37c3662294c795fa2ce369eb9440f2420a4a2d3
|
|
| MD5 |
f947843ff3335668ff1e95e6b089c3ae
|
|
| BLAKE2b-256 |
ad61ab782d625f1fb16e61da96c7daf444d19bb22e9ea312b8baf5425dac4f8c
|