Skip to main content

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 (CLISVO_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


Download files

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

Source Distribution

svo_client-3.0.0.tar.gz (58.1 kB view details)

Uploaded Source

Built Distribution

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

svo_client-3.0.0-py3-none-any.whl (75.5 kB view details)

Uploaded Python 3

File details

Details for the file svo_client-3.0.0.tar.gz.

File metadata

  • Download URL: svo_client-3.0.0.tar.gz
  • Upload date:
  • Size: 58.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for svo_client-3.0.0.tar.gz
Algorithm Hash digest
SHA256 5eab0ddd9e0ce404f91673993ef02eb6c867084afaa13c7050b3b9d5cbd05890
MD5 21d66c7c40a650c1e4acb4eb64fd6324
BLAKE2b-256 47eca80bb16daa979a06a31ac59beb07b5eca4e9485f304c473f4e1c677efd49

See more details on using hashes here.

File details

Details for the file svo_client-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: svo_client-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 75.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for svo_client-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 102dceca6246f019b3bb077f121c36595d4826bce32613f3fd3a73b43aaa6466
MD5 e5c836910ae6ec9c7f5367deaaae9e5f
BLAKE2b-256 6f2dcd5112dd832a672bc6ed891b75bfdb3502734b44dac62df47efaef8cd056

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