The fastest semantic text chunking library
Project description
blazechunk
the fastest semantic text chunking library — up to 1 TB/s throughput
blazechunk splits text at semantic boundaries and does it stupid fast: a SIMD-accelerated
Rust core with a small, uniform Python API. It ships six chunkers — a zero-copy byte Chunker
plus RecursiveChunker, SentenceChunker, TokenChunker, TableChunker, and CodeChunker —
and every high-level chunker offers matching synchronous and asynchronous methods.
📖 Full documentation: https://blazechunk-documentation.vercel.app/
📦 installation
pip install blazechunk
🚀 usage
High-level chunkers (sync + async)
Every chunker exposes the same four methods, so once you know one you know them all:
chunk / chunk_async and chunk_batch / chunk_batch_async.
from blazechunk import TokenChunker
chunker = TokenChunker(chunk_size=512, chunk_overlap=64)
# synchronous
chunks = chunker.chunk("... a long document ...")
for c in chunks:
print(c.text, c.start_index, c.end_index, c.token_count)
# many documents at once
batches = chunker.chunk_batch(["doc one ...", "doc two ..."])
import asyncio
from blazechunk import RecursiveChunker
async def main() -> None:
chunker = RecursiveChunker(chunk_size=2048)
# await a single document — the work runs off the event loop
chunks = await chunker.chunk_async("... a long document ...")
# await many documents concurrently, with optional back-pressure
batches = await chunker.chunk_batch_async(
["doc one ...", "doc two ..."], max_concurrency=8
)
asyncio.run(main())
Other chunkers follow the same shape:
from blazechunk import SentenceChunker, TableChunker, CodeChunker
SentenceChunker(chunk_size=2048, chunk_overlap=128).chunk(prose)
TableChunker(chunk_size=3).chunk(markdown_or_html_table) # header repeated per chunk
CodeChunker(chunk_size=2048, language="python").chunk(source_code)
Low-level byte chunker (zero-copy)
The Chunker primitive and the chunk() helper yield zero-copy memoryview slices for
maximum throughput:
from blazechunk import chunk, chunk_async
# synchronous generator of zero-copy memoryviews
for view in chunk(b"Hello. World. Test.", size=10, delimiters=b"."):
print(bytes(view))
# async variant returns owned bytes
chunks = await chunk_async(b"Hello. World.", size=10, delimiters=b".")
🙏 acknowledgements
blazechunk is a fork of the excellent chonkie-inc/chunk project, and builds on its SIMD chunking core. Licensed under either of Apache License, Version 2.0 or MIT license at your option.
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
Built Distributions
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 blazechunk-0.10.3.tar.gz.
File metadata
- Download URL: blazechunk-0.10.3.tar.gz
- Upload date:
- Size: 108.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ccfb91d5f13c1764eeea694d14a8825ccf2d52c552af68d146c6583a66e8790
|
|
| MD5 |
332d5ba4ceb8860f00b1f608c2f37798
|
|
| BLAKE2b-256 |
1a1209e56a98dc235e767ff416cff1530eb819d84f50d3db8c00b72203ab948b
|
File details
Details for the file blazechunk-0.10.3-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 285.3 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef3c532e747a03ee83424064ebca8f62e09fbad981b41c6604b0b06599566a2c
|
|
| MD5 |
e2e252ab031d38d1a33b8cf87b8f178e
|
|
| BLAKE2b-256 |
c99ed3aa98521a14fe651d6d7be0e0051eabae5e4a78d731ab0408ba0f146a5d
|
File details
Details for the file blazechunk-0.10.3-cp313-cp313-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp313-cp313-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 433.2 kB
- Tags: CPython 3.13, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84db348519b12b6d6b2496e1665178a60ee1d047f9fad6757785b25beac53240
|
|
| MD5 |
60641ae266ae9643c73550729d316e25
|
|
| BLAKE2b-256 |
53ab29fb6588f0bbaa2eb81a87c63834ae886e32547c79f4a338d656c7f4ae45
|
File details
Details for the file blazechunk-0.10.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 445.6 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8de90f9e567347803aad0939740a1efdd232169ac3682edbe131394d7687a89d
|
|
| MD5 |
71f52fbf353ff27576222f3c67cdcc9d
|
|
| BLAKE2b-256 |
ddc53eb2528c7ec0f01eefa9fe29e51259cf12f3db89d9d10d4e452e3ef1fbe0
|
File details
Details for the file blazechunk-0.10.3-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 393.1 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfb16ea578a4aad87a905e3f732caccd4707789b126d4e96acf76a61a179820d
|
|
| MD5 |
53901ce0a2acd779d168b5134e3d13d6
|
|
| BLAKE2b-256 |
e76ff495121b2f60ed2cb6e5d45fc3c2da9b5a8ddadbfd2a624162e163eac2d0
|
File details
Details for the file blazechunk-0.10.3-cp313-cp313-macosx_10_12_x86_64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp313-cp313-macosx_10_12_x86_64.whl
- Upload date:
- Size: 405.3 kB
- Tags: CPython 3.13, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
250198533d2bd6863ce752b0094be3a73f1bd65401667f7cfdf10641d0957478
|
|
| MD5 |
40b9b2a60e6fe2ba72feb072f1bc6137
|
|
| BLAKE2b-256 |
dc49cfaf7c854bc3b096ad430adda6b20cefb019ff6da1e58662bd73a234f882
|
File details
Details for the file blazechunk-0.10.3-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 285.8 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abe402049a599bd611e6d678a9e17a4b61f88f948d56c786c9380d7a90c253bf
|
|
| MD5 |
dda5aca8cdd57e942e356bd8162e730a
|
|
| BLAKE2b-256 |
74e8aeca62cb27d595b7d0163ff84b7854ae3daa931c0a9724e323f429e671c8
|
File details
Details for the file blazechunk-0.10.3-cp312-cp312-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp312-cp312-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 433.3 kB
- Tags: CPython 3.12, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
036159a7e1af0faf45a4dfb5a67e420588dd313b8835c4219424210645e82af1
|
|
| MD5 |
3b8c7e725334cbaf2ac3b8b778fb6a4e
|
|
| BLAKE2b-256 |
f48006e6673dd491bbc7221ef9d39021551fb185fce940e9003c08641ff67ce8
|
File details
Details for the file blazechunk-0.10.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 445.6 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdab730fe7b7730debda56889af59d88263953506a8a7f45de02e467b7328d17
|
|
| MD5 |
70cf2bdf0f6ef0f0c3ae0d53ce590c29
|
|
| BLAKE2b-256 |
b898a5c4e6f1a0348f3c62980559e35e551fbb87b24cb6170da91c2e4bd0afec
|
File details
Details for the file blazechunk-0.10.3-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 393.1 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a29586bb7f7ae419df58e122886ec1c389178b544fe42af93231bd89403b2da
|
|
| MD5 |
8975dfb226edd1936523a5555e3a9436
|
|
| BLAKE2b-256 |
2502a0cccb15dd48210f01184e189767a7b91ddeebc8be298fca2009d3ad221a
|
File details
Details for the file blazechunk-0.10.3-cp312-cp312-macosx_10_12_x86_64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 405.5 kB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01d251c3f297d05ec0ae88317a0020310e8c5b9d2ad609e4efdd16a26e47a1f3
|
|
| MD5 |
434754ef877827845a1def2a32a09116
|
|
| BLAKE2b-256 |
b4d44ec7d84a92574d0bbbf4fd27f68f2c315424164822df11d9edf3fa8b7058
|
File details
Details for the file blazechunk-0.10.3-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 288.5 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74b9d1f433783a0e19483d7c8f486f03cc4df173d0fd3786a24fc58bcc9d707c
|
|
| MD5 |
11eef1fe1f42a56bcee42715f7f1ce07
|
|
| BLAKE2b-256 |
0f0412b8a032fd55345769a490a8e049bbdc9d131bfb6e297960a774cf9ad5bd
|
File details
Details for the file blazechunk-0.10.3-cp311-cp311-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp311-cp311-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 437.0 kB
- Tags: CPython 3.11, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad39643d15b08827000b5fb5fa03fd8c737956a1c5444ff24d9718d651bc3940
|
|
| MD5 |
68c17a90427d71e39edaf70c2c8edb1f
|
|
| BLAKE2b-256 |
f1a86a05c03cc9f59888356b5aaca9e9ecad52e7349d5df09b76dc9a1260e78c
|
File details
Details for the file blazechunk-0.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 448.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f0d8a2e5e148fe19b8f4d6a6c8a8c5facf855af7ca2ad8de4aa496df0aba3d3
|
|
| MD5 |
9fcce5970f67b2719872285ed6dd6ba3
|
|
| BLAKE2b-256 |
129af48e10ac4a98135bc4c7d3b1aece28866c767daec626733fbafb6593b0df
|
File details
Details for the file blazechunk-0.10.3-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 396.2 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5946c977158fd8ab4b7a51e790707e8e6e394917acbbed58085dbb8ea3f6849
|
|
| MD5 |
7604c3044550b813a1e9a9e66fb52f7c
|
|
| BLAKE2b-256 |
cec07add12146ed9a50176f66b25174eed2aecd9b52850e0cef04daf8e74bb87
|
File details
Details for the file blazechunk-0.10.3-cp311-cp311-macosx_10_12_x86_64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 409.1 kB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1062ca102a5a1d9a45f9b94e075faa79b88c334e35910bd3859ec55beb588820
|
|
| MD5 |
cd80d3cffb7b1c730a6fc43731875f09
|
|
| BLAKE2b-256 |
d0b22262e495eea8b249f78aa44ead55afa9154cd9312226b013883b19508005
|
File details
Details for the file blazechunk-0.10.3-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 288.3 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24421b75360e525fda2890c49266f4cff7874a57703403aa141f1bbf276cdf6e
|
|
| MD5 |
23f5e054181790c5084945c52d6ca43f
|
|
| BLAKE2b-256 |
6cbdfc4fb4a6899de76636f38cfaeb704a06b7e432af6538ca85f116b7c4d4e4
|
File details
Details for the file blazechunk-0.10.3-cp310-cp310-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp310-cp310-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 437.3 kB
- Tags: CPython 3.10, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7fc66d21bd9df2cd54ca081188c70c98cd799f547ad1fddd82ee05d4b5e3995
|
|
| MD5 |
2780a49f62981893f89f9f929c2cab4b
|
|
| BLAKE2b-256 |
0aaf8542035edbbb0e0aca5810d1b3e81a0bc998c117beed1cfc2204f786b52c
|
File details
Details for the file blazechunk-0.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 448.9 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e42fd0dac922467ef3117866a74bcea13afb0dcc1e6f36e2ec20da681b64e4d
|
|
| MD5 |
e49dad51c986f2064c6a8376367d0e09
|
|
| BLAKE2b-256 |
0a8ca16572fef8432a7cc9a7093c0e2b589546147738053f24026a0fc8a2201f
|
File details
Details for the file blazechunk-0.10.3-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 396.0 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0992154887051d28852ae2e58efd948f3429f9228743a2d809ba653075761016
|
|
| MD5 |
94e857cb6728bfc93679346e476ebcdd
|
|
| BLAKE2b-256 |
551857348acbb42b4f2e6a67127acd8e4f390a4698d00e74af6f79583c1625ec
|
File details
Details for the file blazechunk-0.10.3-cp310-cp310-macosx_10_12_x86_64.whl.
File metadata
- Download URL: blazechunk-0.10.3-cp310-cp310-macosx_10_12_x86_64.whl
- Upload date:
- Size: 409.1 kB
- Tags: CPython 3.10, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dde90468308751f1b2a18c5595dae91e83ded13bbadac8e69bb82e02f720c74
|
|
| MD5 |
95a43619373cee930caff8ffa6df29e0
|
|
| BLAKE2b-256 |
36d7bc0560921de12a1b9353c57d681e5c67912526b04c8920dfaf6b088533a5
|