pyuuidapikey
A Simple package to generate and validate uuid and apikey key pairs
Install
pip install pyuuidapikey
Example
Generate Keys
from pprint import pprint
from pyuuidapikey import UUIDAPIKey
uuidapikey = UUIDAPIKey()
keys: dict = uuidapikey.generate()
pprint(keys)
Output
{
'apikey': 'TPICACD6-W97D3LB1-473P6SN5-1VNG9X4J',
'uuid': '95f0aac2-3681-4ab1-89a2-6ea5614a191f'
}
Validate Keys
from pyuuidapikey import UUIDAPIKey
apikey: str = 'TPICACD6-W97D3LB1-473P6SN5-1VNG9X4J'
uuid: str = '95f0aac2-3681-4ab1-89a2-6ea5614a191f'
uuidapikey = UUIDAPIKey()
is_valid: bool = uuidapikey.validate(apikey, uuid)
print(is_valid)
Output
True
Inspired the works from the JS library,
Metadata
Release files for pyuuidapikey 0.0.3
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 |
|---|---|---|---|---|
| pyuuidapikey-0.0.3.tar.gz | 3.3 kB | Without provenance | Details for pyuuidapikey-0.0.3.tar.gz |
Release files / pyuuidapikey-0.0.3.tar.gz
| Download URL | pyuuidapikey-0.0.3.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46888343f627f85807bfdc1964972226e28c24d68cbeec58c30c5a1bb923887b
|
|
BLAKE2b-256 checksum How to use checksums |
07c4ffdad635b608f194e9df747d5201b061bbf4703eb5a1af48f90ca41a503a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9
|
Security for pyuuidapikey 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.