exrex_variant_generator
exrex_variant_generator is a Python package that leverages regular expressions to generate all possible string variants. It can handle standard regex patterns by expanding them into all matching strings, or it can interpret custom string formats with bracketed options to generate combinations.
Installation
To install exrex_variant_generator, use pip:
pip install exrex_variant_generator
Usage
Using exrex_variant_generator is straightforward.
Generating variants from a custom string with options:
This mode interprets strings like 'a[bc]d' to generate combinations.
from exrex_variant_generator import generate_variants
custom_pattern = 'user[123]_pref[a|b]'
variants = generate_variants(custom_pattern)
print(variants)
# Output: ['user1_prefa', 'user1_pref b', 'user2_prefa', 'user2_pref b', 'user3_prefa', 'user3_pref b']
Generating variants from a strict regex pattern:
This mode uses the exrex library to generate all strings matching a given regex.
from exrex_variant_generator import generate_variants
regex_pattern = '[a-c]{2}'
variants = generate_variants(regex_pattern)
print(variants)
# Output: ['aa', 'ab', 'ac', 'ba', 'bb', 'bc', 'ca', 'cb', 'cc']
Author
- Eugene Evstafev hi@eugene.plus - LinkedIn
Repository
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
License
exrex_variant_generator is licensed under the MIT License.
Metadata
Release files for exrex-variant-generator 2025.9.142053
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 |
|---|---|---|---|---|
| exrex_variant_generator-2025.9.142053.tar.gz | 2.7 kB | Without provenance | Details for exrex_variant_generator-2025.9.142053.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| exrex_variant_generator-2025.9.142053-py3-none-any.whl | Python 3 | none | any | Details for exrex_variant_generator-2025.9.142053-py3-none-any.whl |
Total release size: 6.0 kB
Release files / exrex_variant_generator-2025.9.142053.tar.gz
| Download URL | exrex_variant_generator-2025.9.142053.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac724fa1774b7dc6c511c632bf1cce93cc1dc971d57ec08d3e187336e450cd7d
|
|
BLAKE2b-256 checksum How to use checksums |
75af2d6d51d6468a51c8eb2882724c86b682285ca2e87064b8f308740dff220d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / exrex_variant_generator-2025.9.142053-py3-none-any.whl
| Download URL | exrex_variant_generator-2025.9.142053-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
43850e7c1df4d5c2429cbc36e22d393e796a24b00c6ed055830b32b72ba6c38f
|
|
BLAKE2b-256 checksum How to use checksums |
9927862ab4a1e933fd88742a91aa41017ce4b7a9b47693b76841ea64e8bf71b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for exrex-variant-generator 2025.9.142053
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.