A package to generate and validate HomeX ID's (HXID's)
Project description
Homex HXID Generator Library for Python
This is a Python implementation of HXID (HomeX ID) generation and validation. It is intended to be used by both systems that generate HXIDs and systems that want to validate existing HXIDs.
Requirements
This project requires Python version >=3.6.
Installation
Add hxid>=0.1.0 to your requirements.txt file or simply install locally with:
pip install hxid
Usage
The available public methods include:
def generate_hxid(prefix: str, seed:str, config: HxidConfig = None, appendage_configs: List[HxidConfig] = []) -> strdef is_hxid(candidate: str) -> bool
Also, there is a public class constructor for generating HXID config objects:
HxidConfig(prefix: str, seed: str, target_length: int = 9, collision_incrementor: int = 0)
For optimal use of this package, generate your HxidConfig objects and pass these into generate_hxid to produce your HXIDs.
Testing & Contributing
Run tests locally with
python -m unittest tests/test_hxid.py
The test suite will be checked for any Pull Requests made to this repository. Please adapt the tests to your proposed changes for contributing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hxid-0.1.1.tar.gz.
File metadata
- Download URL: hxid-0.1.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88de00681e0cc7caa03dbe04df2b2a45c850a79f4a71272eec702cfe068b0538
|
|
| MD5 |
00c84c68907ac82f5b53a4a40c59c103
|
|
| BLAKE2b-256 |
694a89883e942f10fb69a1cd76b22fec1d319664258825d38ffff493c72e0407
|
File details
Details for the file hxid-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hxid-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b0c5ebba380ae3807e62bd89d04e125d2b83e633d82e49d96a91d5952ba642f
|
|
| MD5 |
fd684bc5254f0433c43bdba01bebad3e
|
|
| BLAKE2b-256 |
22078f7a2dec7517dede1576ff72cbac44fb9c2468a11132b1c2f7f7de8bcded
|