Skip to main content

antkit

English | 中文

密码学安全的随机 token 与口令生成。

安装

pip install antkit

用法

from antkit import password, token

token()                       # 22 字符,16 字节熵
token(n_bytes=32)
token(n_urlsafe=False)        # hex

password()                    # 16 位,四类字符全用
password(24, n_symbols=False)
password(12, n_lower=False, n_upper=False)

说明

全部基于 secrets,不用 random(它的种子可预测,不能用于任何不该被猜到的值)。口令保证每个启用的字符类至少出现一次,然后整体打乱,避免保底字符堆在开头。请求不可能满足时抛 ValueError。

许可证

MIT


English

Cryptographically secure tokens and passwords.

Install

pip install antkit

Usage

from antkit import password, token

token()                       # 22 字符,16 字节熵
token(n_bytes=32)
token(n_urlsafe=False)        # hex

password()                    # 16 位,四类字符全用
password(24, n_symbols=False)
password(12, n_lower=False, n_upper=False)

Notes

Built on secrets, never random. Passwords always contain at least one character from every enabled class, then get shuffled so the guaranteed characters are not stuck at the front. Impossible requests raise ValueError.

License

MIT

Metadata

Release files for antkit 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for antkit 0.0.3
File Size Uploaded Provenance Actions
antkit-0.0.3.tar.gz 3.5 kB Without provenance Details for antkit-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for antkit 0.0.3
File Interpreter ABI Platform Actions
antkit-0.0.3-py3-none-any.whl Python 3 none any Details for antkit-0.0.3-py3-none-any.whl

Total release size: 7.4 kB

Release files / antkit-0.0.3.tar.gz

Download URL antkit-0.0.3.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
be3188b122172820074e61fdacaed55ebcaf57b56027f628bbcdb2cc3a29aba3
BLAKE2b-256 checksum
How to use checksums
7e6b60246d7ecad476e5bb9c1f3080f6ce6b725fdee367db371e04627112d4dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release files / antkit-0.0.3-py3-none-any.whl

Download URL antkit-0.0.3-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
abb02f3d6d39468755c54cce29b7846e60c4727cb073ec46759c292b44893f4d
BLAKE2b-256 checksum
How to use checksums
7c90aa6ff72474e7a16d61ed45e82e64af8f7ba208b699d62504fc71932cfd6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Security for antkit 0.0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page