Consistent API for string workloads
Project description
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
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 Distribution
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 strx-0.3.1.tar.gz.
File metadata
- Download URL: strx-0.3.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb80040b5bd7c96755e41639ae916cac1f9259c3519100b1e0a5fc768ac210fe
|
|
| MD5 |
e18c47babf2afdd28ba3bc5392912b18
|
|
| BLAKE2b-256 |
d4b9e058936be79db576698f003a1e114caa12284f87b78e8bbc96873e880622
|
Provenance
The following attestation bundles were made for strx-0.3.1.tar.gz:
Publisher:
publish.yml on thuyetbao/strx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strx-0.3.1.tar.gz -
Subject digest:
cb80040b5bd7c96755e41639ae916cac1f9259c3519100b1e0a5fc768ac210fe - Sigstore transparency entry: 675223001
- Sigstore integration time:
-
Permalink:
thuyetbao/strx@c68d9f09e28bc7421f009ed9b4191dc773688cbd -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/thuyetbao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c68d9f09e28bc7421f009ed9b4191dc773688cbd -
Trigger Event:
release
-
Statement type:
File details
Details for the file strx-0.3.1-py3-none-any.whl.
File metadata
- Download URL: strx-0.3.1-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
454261feace6372d10ec8050918840b509ddea1b0c6d378f73e65629e2341c76
|
|
| MD5 |
5b80be90b7db0bf798a46737d511cb81
|
|
| BLAKE2b-256 |
346607ee054cb42255737831c304b8ffe379d8ac16ee0230a67c5ea9321c9d14
|
Provenance
The following attestation bundles were made for strx-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on thuyetbao/strx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strx-0.3.1-py3-none-any.whl -
Subject digest:
454261feace6372d10ec8050918840b509ddea1b0c6d378f73e65629e2341c76 - Sigstore transparency entry: 675223005
- Sigstore integration time:
-
Permalink:
thuyetbao/strx@c68d9f09e28bc7421f009ed9b4191dc773688cbd -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/thuyetbao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c68d9f09e28bc7421f009ed9b4191dc773688cbd -
Trigger Event:
release
-
Statement type: