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,
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyuuidapikey-0.0.3.tar.gz
(3.3 kB
view details)
File details
Details for the file pyuuidapikey-0.0.3.tar.gz.
File metadata
- Download URL: pyuuidapikey-0.0.3.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46888343f627f85807bfdc1964972226e28c24d68cbeec58c30c5a1bb923887b
|
|
| MD5 |
169a1f53fd57c37d0c81d279957cb1a2
|
|
| BLAKE2b-256 |
07c4ffdad635b608f194e9df747d5201b061bbf4703eb5a1af48f90ca41a503a
|