Pattern based string generator library and CLI
Project description
wildling
Python library and CLI for pattern-based string generation. Zero third-party dependencies (stdlib only). Requires Python 3.9+.
Docs: Website · Sandbox · Syntax · Source
Registry: PyPI
Example
http://${'dev,stage,prod'}\-${'api,web'}#{0-2}.example.${'com,net,org'}/@.html
(The \- is a literal hyphen; bare - would mean “one letter or digit”. @ is one lowercase letter.)
That builds URL-shaped candidates: scheme http://, then environment × service × optional digits × TLD, then a one-letter path page. Three environments, two services, zero–two digits ('', 0–9, 00–99), three TLDs, and a–z → 51948 strings — the kind of list you generate for fuzzing links or probing staging hosts, not type out.
A few of them:
http://dev-api.example.com/a.html/http://stage-web.example.com/z.htmlhttp://dev-api0.example.net/a.html/http://prod-web9.example.org/m.htmlhttp://dev-api00.example.com/a.html/http://prod-web99.example.org/z.html
Named dictionaries (%{'hosts'}) work the same way when the word lists live in files.
Try it in the sandbox, or see pattern syntax for length ranges, dictionaries, and escapes.
Install
From this repository:
cd python
./build.sh
# or without Docker:
cp ../docs/help.txt wildling/help.txt
The CLI is ./bin/wildling.
Registry: pip install wildling
Git:
pip install "git+https://github.com/dotmonk/wildling.git@v2.0.0#subdirectory=python"
Library
from wildling import create_wildling
wildling = create_wildling(
patterns=["abrakadabra", "Year 19##"],
dictionaries={"colors": ["red", "blue"]},
)
wildling.count() # 101
wildling.get(0) # "abrakadabra"
value = wildling.next()
while value is not False:
print(value)
value = wildling.next()
wildling.reset()
API
| Method | Description |
|---|---|
next() |
Next combination, or False when exhausted |
get(index) |
Combination at index, or False if out of range |
count() |
Total combinations across all patterns |
index() |
Current position (after next calls) |
reset() |
Reset iteration to the start |
generators() |
Per-pattern generators |
CLI
./bin/wildling "Year 19##"
./bin/wildling --dictionary planets:../dictionaries/planets.txt "%{'planets'}"
./bin/wildling --template ./config.json
Help text and --check output follow docs/cli.md / docs/help.txt.
Build
./build.sh # Docker: copy help.txt + byte-compile
Project tests live in ../tests/ and are run with ../test.sh.
Project details
Release history Release notifications | RSS feed
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 wildling-2.0.1.tar.gz.
File metadata
- Download URL: wildling-2.0.1.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f84a66232da12196fd1a9e8b9b9ff2f2fa2041085acc49c71499de151cfaa62
|
|
| MD5 |
0486dae3f90b8102923b9c016990c472
|
|
| BLAKE2b-256 |
86ba353ab137ad4555519f99a40f74cd618d501f90ca9a6120426c362ec57518
|
Provenance
The following attestation bundles were made for wildling-2.0.1.tar.gz:
Publisher:
release.yml on dotmonk/wildling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wildling-2.0.1.tar.gz -
Subject digest:
1f84a66232da12196fd1a9e8b9b9ff2f2fa2041085acc49c71499de151cfaa62 - Sigstore transparency entry: 2219481362
- Sigstore integration time:
-
Permalink:
dotmonk/wildling@6c1f02f8166141bef4c2052e7a89f8d51f631308 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dotmonk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6c1f02f8166141bef4c2052e7a89f8d51f631308 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file wildling-2.0.1-py3-none-any.whl.
File metadata
- Download URL: wildling-2.0.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1df27f958cc523b555a3af90dab32f973d6bda3686268ad7748974cbab597259
|
|
| MD5 |
ed4d9eafcc9bda182f3321a18c98d718
|
|
| BLAKE2b-256 |
31078643255616bf778648ca282672dfe7915abda62e2b941e06836ab2a51961
|
Provenance
The following attestation bundles were made for wildling-2.0.1-py3-none-any.whl:
Publisher:
release.yml on dotmonk/wildling
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wildling-2.0.1-py3-none-any.whl -
Subject digest:
1df27f958cc523b555a3af90dab32f973d6bda3686268ad7748974cbab597259 - Sigstore transparency entry: 2219481696
- Sigstore integration time:
-
Permalink:
dotmonk/wildling@6c1f02f8166141bef4c2052e7a89f8d51f631308 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dotmonk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6c1f02f8166141bef4c2052e7a89f8d51f631308 -
Trigger Event:
workflow_dispatch
-
Statement type: