Skip to main content

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] = []) -> str
  • def 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.

Release files for hxid 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hxid 0.1.1
File Size Uploaded
hxid-0.1.1.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hxid 0.1.1
File Interpreter ABI Platform
hxid-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / hxid-0.1.1.tar.gz

Download URL hxid-0.1.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
88de00681e0cc7caa03dbe04df2b2a45c850a79f4a71272eec702cfe068b0538
BLAKE2b-256 checksum
How to use checksums
694a89883e942f10fb69a1cd76b22fec1d319664258825d38ffff493c72e0407
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / hxid-0.1.1-py3-none-any.whl

Download URL hxid-0.1.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b0c5ebba380ae3807e62bd89d04e125d2b83e633d82e49d96a91d5952ba642f
BLAKE2b-256 checksum
How to use checksums
22078f7a2dec7517dede1576ff72cbac44fb9c2468a11132b1c2f7f7de8bcded
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page