Timeflake is a Python library for generating 128-bit, roughly-ordered, URL-safe UUIDs, inspired by Twitter's Snowflake, Instagram's ID, and Firebase's PushID. It combines a timestamp with a random component. The current version is 0.4.3, with releases typically occurring a few times a year to introduce new features or address issues.
pip install timeflakeVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to generate a new Timeflake, access its various representations (integer, hex, base62, UUID, datetime), and parse an existing Timeflake string back into an object.
Instead of `from timeflake import Timeflake; tf = Timeflake()`, use `import timeflake; tf = timeflake.timeflake()`.
Previous versions might have used `Timeflake.random()` or similar. The new recommended way is `timeflake.timeflake()` for a new random ID, or `timeflake.parse()` to decode.
Understand the ordering guarantees for your use case. If strict monotonicity within the same millisecond is critical, Timeflake may not be the ideal solution without additional sequencing.
The class was renamed to `timeflake` (lowercase). Use `import timeflake; tf_obj = timeflake.timeflake()` to instantiate a new object.
To generate a new timeflake, call the `timeflake()` function *within* the module: `import timeflake; tf_obj = timeflake.timeflake()`.
Update your code to `import timeflake` and then use `timeflake.timeflake()` to create instances.
No dependency data recorded yet.