cx-apikey is easy to use and small API keys system.
It could be used to generating API keys, validating them and also works with them in the system. API keys generator use operating system random number generator, tokens have also selected prefixes, size of them could be changed, default its 256 letters.
How simple is it?
First, install it from PyPi.
python -m venv .venv
source .venv/bin/activate
pip install cx-apikey
Then, You can use it in app. Let's generate first API key.
import cx_apikey as apikey
test = apikey.apikey_factory("test").set_size(128).generate()
print(repr(test))
You would see something like that:
API key: "test_1bf6b4320bc893435934ebe634f447f4e2d5076edda950357b95f2
01e98640268cb1d23e571d3a6f9883300eac0605d553dfa662920390a322023441c05"
For more complex usage see project wiki
Metadata
Release files for cx-apikey 2025.11.3.post2
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 | |
|---|---|---|---|---|
| cx_apikey-2025.11.3.post2.tar.gz | 6.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cx_apikey-2025.11.3.post2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / cx_apikey-2025.11.3.post2.tar.gz
| Download URL | cx_apikey-2025.11.3.post2.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
288503f03c3dfd2364e40b719aa2be4855c856a2aec7565c869b58a1c394befe
|
|
BLAKE2b-256 checksum How to use checksums |
3b9246d8e984976ea9feec17aa2269ca5c3478a9a4b46631effc31e181cc3635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / cx_apikey-2025.11.3.post2-py3-none-any.whl
| Download URL | cx_apikey-2025.11.3.post2-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
616a0e68f78374ea9bb8488c7cbfacf9020f1b3de9311d0df105000f7a52a618
|
|
BLAKE2b-256 checksum How to use checksums |
b33987d1e1500873e3153819ffaa7345f51f5cee8cf55cb7f6b84329e10a43c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for cx-apikey 2025.11.3.post2
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.