Metadata-Version: 2.5
Name: antkit
Version: 0.0.2
Summary: Cryptographically secure tokens and passwords.
Project-URL: Homepage, https://github.com/lqxnjk/antkit
Author: lqxnjk
License: MIT
License-File: LICENSE
Keywords: password,random,secrets,security,token
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# antkit

Generate tokens and passwords with `secrets` — never with `random`.

## Install

```console
pip install antkit
```

## Usage

```python
from antkit import password, token

token()                       # 22-char URL-safe string, 16 bytes of entropy
token(m_bytes=32)             # longer
token(n_urlsafe=False)        # hex instead

password()                    # 16 chars, all four classes
password(24, n_symbols=False)
password(12, n_lower=False, n_upper=False)   # digits + symbols only
```

## Guarantees

| Function | Guarantee |
| --- | --- |
| `token` | `secrets`-backed, URL-safe by default |
| `password` | at least one character from every enabled class |
| `password` | order shuffled, guaranteed chars are not prefix-stuck |
| both | `ValueError` on impossible requests |

`random` is not used anywhere: it is seeded predictably and is the wrong tool
for anything a user must not guess.

## License

MIT
