A Python library for generating Snowflake-like unique IDs, inspired by Twitter's Snowflake ID. Version 1.0.2 supports Python 3.8+ and provides a simple interface for distributed unique ID generation with configurable epoch, worker ID, and sequence. The library is stable but not frequently updated.
pip install snowflake-idVerified import paths — ran on the pinned version, not inferred.
Create a generator with a worker ID (0-1023) and generate IDs by calling next().
Use next(gen) or for id in gen: ...
Ensure worker ID is an integer between 0 and 1023.
Use NTP or similar time synchronization across workers.
Run: pip install snowflake-id, then import: from snowflake import SnowflakeGenerator
Use next(gen) to get the next ID.
No dependency data recorded yet.