Skip to main content

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="Comment",
            aggregation_mode="paragraph",
            respect_structural_blocks=True,
            language="en",
        )
        print(len(chunks))

asyncio.run(main())

Current Chunker Parameters

  • chunk_type="Comment" is passed as RPC field type="Comment" for comments, docstrings, or other pre-extracted blocks. The server owns the Comment keep-block policy.
  • aggregation_mode is optional. Supported values are "sentence", "none", and "paragraph". When omitted, the client does not send the field.
  • respect_structural_blocks is optional. Use True or False to send respect_structural_blocks; omit it to preserve the server default.
from svo_client import build_file_chunk_params
from svo_client.file_processor import file_chunk_from_local_path

chunks = await client.chunk(
    text="# module comment",
    chunk_type="Comment",
    aggregation_mode="paragraph",
    respect_structural_blocks=True,
)

batch = await client.chunk_batch(
    ["first paragraph", "second paragraph"],
    aggregation_mode="paragraph",
    respect_structural_blocks=False,
)

params = build_file_chunk_params(
    filename="comments.py",
    file_content_base64=encoded,
    chunk_type="Comment",
    aggregation_mode="paragraph",
    respect_structural_blocks=True,
)
result = await client.file_chunk(params)

result = await file_chunk_from_local_path(
    client,
    "comments.py",
    chunk_type="Comment",
    aggregation_mode="paragraph",
    respect_structural_blocks=True,
)

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).

svo-client chunk text -i sample.txt -o out.json --format json --chunk-type Comment
svo-client file-chunk -i sample.md -o out.jsonl --aggregation-mode paragraph --respect-structural-blocks
svo-client file-chunk -i comments.py --no-download --chunk-type Comment --no-respect-structural-blocks

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.

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-4.0.1.4.tar.gz (73.5 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-4.0.1.4-py3-none-any.whl (95.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: svo_client-4.0.1.4.tar.gz
  • Upload date:
  • Size: 73.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for svo_client-4.0.1.4.tar.gz
Algorithm Hash digest
SHA256 0246601f0421a199eba3a0ceb6b3cdad61e7a7164100aa826a9f06ed7a77d8c2
MD5 fb7d477be9cfc2983f292191af4a62de
BLAKE2b-256 0f0796588facf61d7a0c192c7439ab5f750bf06dff43728dae482501b6dc70a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: svo_client-4.0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 95.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for svo_client-4.0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f6b17f715ffeb034388bddb7f8b273a263d2a7300e8875fc2d1f37e42a704c1f
MD5 1a995712dc31fe8c0ea9ff4a33fd12da
BLAKE2b-256 ae2df13f183a37ced481185953905e039d441844db12c2428c5ee4ac92cddae0

See more details on using hashes here.

Release history Release notifications | RSS feed

4.0.5

2 files

4.0.1.7

2 files

4.0.1.6

2 files

4.0.1.5

2 files

This release

4.0.1.4 This release

2 files

4.0.1.3

2 files

4.0.1.2

2 files

4.0.1.1

2 files

4.0.1

2 files

4.0.0

2 files

3.3.2

2 files

3.3.1

2 files

3.3.0

2 files

3.2.0

2 files

3.1.1

2 files

3.1.0

2 files

3.0.1

2 files

3.0.0

2 files

2.3.2

2 files

2.3.1

2 files

2.2.15

2 files

2.2.14

2 files

2.2.13

2 files

2.2.12

2 files

2.2.11

2 files

2.2.10

2 files

2.2.9

2 files

2.2.8

2 files

2.2.7

2 files

2.2.6

2 files

2.2.5

2 files

2.2.4

2 files

2.2.3

2 files

2.2.2

2 files

2.2.1

2 files

2.2.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.0

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

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