StrX
Consistent API for string workloads
strx features
-
Consistent API: All functions start with
str_*prefix and take astringas the first argument -
Strict type checking: All functions use precise type hints to ensure safety and early error detection.
-
Comprehensive test suite: 100% coverage and zero errors
Installation
Install package from PyPI distribution strx
pip install strx
Usage
Import into the script
import strx
For general string manipulation
strx.str_snakecase
strx.str_reverse
strx.str_pad
strx.str_length
strx.str_sub
strx.str_trim
strx.str_count
strx.str_sort
strx.str_unique
strx.str_dup
For string pattern matching
strx.str_detect
strx.str_remove
strx.str_replace
strx.str_replace_all
strx.str_split
strx.str_which
strx.str_extract
strx.str_extract_all
Join strings
strx.str_concat("strx", "is", "awesome", sep=" ")
"strx is awesome"
Convert string to different cases, such as upper, lower, title
strx.str_to_upper("strx")
"STRX"
strx.str_to_lower("STRX")
"strx"
strx.str_to_title("strx")
"Strx"
Convert string into numeric (float, int)
strx.str_to_number("1,000,000.00", radix=".", delimiter=",")
1000000.0
strx.str_to_number("1.000.000,00", radix=",", delimiter=".")
1000000.0
strx.str_to_number("1_000_000,00", radix=",", delimiter="_")
1000000.0
or convert string into ratio
strx.str_to_ratio("350:100")
3.5
strx.str_to_ratio("88/8", sep_by="/")
11.0
Documentation:
Documentation document at folder docs/
Code Storage:
Repository: GitHub > Repository:strx
Releases:
Releases: GitHub > Repository:strx > Releases
Metadata
Release files for strx 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| strx-0.3.1.tar.gz | 7.6 kB | With provenance | Details for strx-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| strx-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for strx-0.3.1-py3-none-any.whl |
Total release size: 15.7 kB
Release files / strx-0.3.1.tar.gz
| Download URL | strx-0.3.1.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb80040b5bd7c96755e41639ae916cac1f9259c3519100b1e0a5fc768ac210fe
|
|
BLAKE2b-256 checksum How to use checksums |
d4b9e058936be79db576698f003a1e114caa12284f87b78e8bbc96873e880622
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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 Nov 6, 2025.
Transparency logRelease files / strx-0.3.1-py3-none-any.whl
| Download URL | strx-0.3.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
454261feace6372d10ec8050918840b509ddea1b0c6d378f73e65629e2341c76
|
|
BLAKE2b-256 checksum How to use checksums |
346607ee054cb42255737831c304b8ffe379d8ac16ee0230a67c5ea9321c9d14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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 Nov 6, 2025.
Transparency logSecurity for strx 0.3.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for strx-0.3.1.tar.gz
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 Nov 6, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.