Skip to main content

isplit logo

Lazy, typed string splitting helpers for Python, backed by Rust.

PyPI Python versions CI MIT License

isplit scans a string once and yields pieces as soon as separators are found. It is useful for tokenizer-style code where callers want to consume tokens lazily instead of allocating the whole split result up front.

The iterator implementation is backed by a small PyO3 Rust extension when available, with the original pure-Python implementation kept as a fallback.

Installation

python -m pip install isplit-rs

The PyPI distribution is named isplit-rs, while the Python package is imported as isplit.

Quick start

from isplit import irsplit, isplit

list(isplit("A+B+C+D", "+"))
# ["A", "B", "C", "D"]

list(isplit("AAA,,BBB", ",,"))
# ["AAA", "BBB"]

list(irsplit("A+B+C+D", "+"))
# ["D", "C", "B", "A"]

Or consume pieces lazily:

from isplit import isplit

for token in isplit("AAA,BBB,CCC", ","):
    print(token)

Why isplit?

Feature What it gives you
Lazy iteration Consume split pieces one at a time
Forward and reverse splits Use isplit or irsplit depending on scan direction
Rust acceleration Use the PyO3 extension when available
Pure-Python fallback Keep imports working even without the extension
Typed package Ship a py.typed marker for type checkers

API

isplit(text: str, sep: str) -> Iterator[str]
irsplit(text: str, sep: str) -> Iterator[str]
  • isplit(text, sep) yields pieces from left to right.
  • irsplit(text, sep) yields pieces from right to left.

Both functions follow str.split semantics for non-empty separators and raise ValueError when sep is empty.

Release files for isplit-rs 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for isplit-rs 0.1.0
File Size Uploaded
isplit_rs-0.1.0.tar.gz 9.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for isplit-rs 0.1.0
File Interpreter ABI Platform
isplit_rs-0.1.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
isplit_rs-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details
isplit_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details

Total release size: 635.2 kB

Release files / isplit_rs-0.1.0.tar.gz

Download URL isplit_rs-0.1.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
58cfa7a6e898a166643583a98353ca59b9c836b449061f00bc9be97538cb9a37
BLAKE2b-256 checksum
How to use checksums
f52dde0850b70e9e845f19459c2125dd219a51caf452ab604dae638abe4ffdb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / isplit_rs-0.1.0-cp39-abi3-win_amd64.whl

Download URL isplit_rs-0.1.0-cp39-abi3-win_amd64.whl
Size 128.8 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a57dc03ded4b7ecb036c02913772248a0eed4ce56eda3ae62e174437811b337e
BLAKE2b-256 checksum
How to use checksums
3753349b6a4212ccf57ff9143b25ac647a4805d713b58d0c25e20b7661e7c6a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / isplit_rs-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL isplit_rs-0.1.0-cp39-abi3-manylinux_2_28_x86_64.whl
Size 267.7 kB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
d192f100a663c37d81a2218ed11752b82e8e5f82878d762ffb0019fc12e2fadc
BLAKE2b-256 checksum
How to use checksums
6e0750fd06a0f0a035b7b5527d88b0c39abfba5c1743309cc7f29d19c3fd0c2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / isplit_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL isplit_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Size 229.4 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fc8c0c9ce3ff778f16c629450d5ee813d98741e21b1d6f6595f34deb366a2dc7
BLAKE2b-256 checksum
How to use checksums
96b87a5c67019159221dae3d5a5e96472644e6a39c1b613ce74f27b888c34ea0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

4 release files

0.2.0

4 release files

This release

0.1.0 This release

4 release 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