Skip to main content

textwrap2

Python bindings (via PyO3/maturin) for textwrap_rs, a Rust port of Python's standard-library textwrap module.

Install

pip install textwrap2

Usage

import textwrap2

textwrap2.wrap("hello world", width=5)
# ['hello', 'world']

Install without PyPI

Straight from a tag or branch (builds from source locally, requires a Rust toolchain):

pip install git+https://github.com/akawd/textwrap.git@v0.1.0

Or grab a prebuilt wheel for your platform from the Releases page and install it directly:

pip install https://github.com/akawd/textwrap/releases/download/v0.1.0/textwrap2-0.1.0-cp311-abi3-win_amd64.whl

Releasing (maintainers)

Two manually-triggered (workflow_dispatch) GitHub Actions workflows build the same wheels for Linux/Windows/macOS; nothing is published automatically on push or tag.

  • .github/workflows/publish.yml — publishes to PyPI using Trusted Publishing (OIDC), no API token stored in the repo. The trusted publisher is registered on PyPI (textwrap2 project → Publishing) with:

    • Owner: akawd
    • Repository name: textwrap
    • Workflow name: publish.yml
    • Environment name: pypi

    The pypi environment name must also exist under repo Settings → Environments — it's what GitHub uses to scope the id-token: write permission for the OIDC claim.

  • .github/workflows/github-release.yml — skips PyPI entirely and instead attaches the built wheels + sdist to a GitHub Release, for installing straight from GitHub (see above). Takes a version input (e.g. v0.1.0) and creates that tag/release if it doesn't exist yet.

To release: bump the version in pyproject.toml, commit, then run the relevant workflow manually from the Actions tab.

Metadata

Release files for textwrap2 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 textwrap2 0.1.0
File Size Uploaded
textwrap2-0.1.0.tar.gz 63.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for textwrap2 0.1.0
File
textwrap2-0.1.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
textwrap2-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details
textwrap2-0.1.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
textwrap2-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details

Total release size: 3.8 MB

Release files / textwrap2-0.1.0.tar.gz

Download URL textwrap2-0.1.0.tar.gz
Size 63.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a5e8ae375b620cb8530bbe4170456f4f885807a83d0a09ab6273ea98b36ac37b
BLAKE2b-256 checksum
How to use checksums
468978def9e302823ba0e0acdfb9310ad566bd8fb0158579a5860e496e2aff67
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 Aug 6, 2026.

Transparency log

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

Download URL textwrap2-0.1.0-cp39-abi3-win_amd64.whl
Size 815.4 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8b88a1cc268dcc900f849e27ec58abe7d9170a97b353c7f25d536cc2e358768b
BLAKE2b-256 checksum
How to use checksums
8d0ae789082f99520276793783b805f3faba4b02692d0681571c71fed89af603
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 Aug 6, 2026.

Transparency log

Release files / textwrap2-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL textwrap2-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
c75f6cae38b59f9bfe2a8a5f8ab675f329c54c7bcafda6b526c19787c95fae1f
BLAKE2b-256 checksum
How to use checksums
cdf519834d3c5b30a2dfb35cc9a54d25de51cc61035af724ab60e8c258944d70
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 Aug 6, 2026.

Transparency log

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

Download URL textwrap2-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Size 909.5 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7833e5dd6289d39841a714d107054210fca169845f57ba4479f4a6b05e271795
BLAKE2b-256 checksum
How to use checksums
9165f8c09c09bf49b60b90f0eaff7108109cb805c9aa0fd8b2496707d3255b57
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 Aug 6, 2026.

Transparency log

Release files / textwrap2-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL textwrap2-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 941.9 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
32df0a2eddcbe49c542add4400b87797d096955affeacf7b3a99d3adb263cd4e
BLAKE2b-256 checksum
How to use checksums
c3aa952f6ab46516a11a15b6db6fcd86c82943d49de2ffeb5fe79bcccbcb9af4
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 Aug 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

5 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