pygenstr
按指定规则生成字符串。
特征
- 可生成 纯数字
- 可生成 纯字母、
- 可生成 纯数字+纯字母
- 可生成 数字与字母混合
- 可生成 排除纯数字和纯字母
- 可生成 自定义字符
- 可生成 自定义字符(排除纯数字和纯字母)
- 可生成 自定义字符(纯数字和纯字母)
使用
from genstr import Genstr
from genstr import Mode
list = Genstr(
length: int,
mode: Mode = Mode.PURE_NUMBERS,
alphabets: str = '',
prefix: str = '',
suffix: str = '',
is_range: bool = False
).combine().list()
print(type(list), list)
<class 'list'>
[]
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
length |
int | 无 | 组合长度 |
mode |
Mode(枚举) |
Mode.PURE_NUMBERS | 域名组合模式: 1. 纯数字 2. 纯字母 3. 纯数字+纯字母 4. 数字与字母混合 5. 排除纯数字和纯字母 6. 自定义字符 7. 自定义字符(排除纯数字和纯字母) 8. 自定义字符(纯数字和纯字母) |
alphabets |
str | 空 | 自定义组合字母表,mode 6/7/8 必填 |
prefix |
str | 空 | 组合前缀,如 -P a,则生成 a* |
suffix |
str | 空 | 组合后缀,如 -S z,则生成 *z |
is_range |
bool | False | 范围,如长度为 3 时,则范围长度为 1-3 内的数据1~999 |
仓库镜像
Metadata
Release files for genstr 0.1.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 |
|---|---|---|---|---|
| genstr-0.1.1.tar.gz | 13.7 kB | Without provenance | Details for genstr-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| genstr-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for genstr-0.1.1-py3-none-any.whl |
Total release size: 23.9 kB
Release files / genstr-0.1.1.tar.gz
| Download URL | genstr-0.1.1.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b00010e6b0a5f10ea921aa95ceb97ca465f891b9a3275cde6c1dbebb2d0c10e5
|
|
BLAKE2b-256 checksum How to use checksums |
88456fb8ac99d9d6ef6aafe3f6dcccfe6ab63f8206460986a73fe6dc584265d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / genstr-0.1.1-py3-none-any.whl
| Download URL | genstr-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc4ba157e42690310bf706c2c8eefd1ef1575945a6875af23c545642b75ba5d1
|
|
BLAKE2b-256 checksum How to use checksums |
55191044192d45c5f3930ae93249d2737163d49c19a81e22996cf163648480b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Security for genstr 0.1.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.
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.