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 | |
|---|---|---|---|
| pyuuidapikey-0.0.3.tar.gz | 3.3 kB | Details |
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
|