{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/16"}],"enrichment":{"capability":"Generates 128-bit, time-ordered, URL-safe unique identifiers (UUIDs) with millisecond-precision timestamps and cryptographic randomness, compatible with standard uuid.UUID.","skillfed_tags":["uuid-generation","distributed-systems","database-optimization"],"use_cases":["Use as a primary key in MySQL, Postgres, or SQLite3 to maintain insertion order and avoid index fragmentation.","Generate unpredictable but sortable IDs for URLs and APIs where auto-increment integers are too predictable.","Create distributed IDs across multiple machines without coordination or a centralized ID service.","Replace UUID v4 in applications where both randomness and temporal ordering improve query performance."],"what_it_does":"Timeflake is a 128-bit unique identifier that combines a 48-bit millisecond timestamp with an 80-bit cryptographically random component, designed to be both sortable and collision-resistant. Unlike UUID v1 (which leaks network info) or UUID v4 (which is random and fragments database indices), Timeflake orders by time in its most significant bits, keeping database indices compact and fast while remaining unpredictable within each millisecond.\n\nThe package provides multiple encodings\u2014128-bit unsigned int, hex, URL-safe base62 (22 chars), and raw bytes\u2014and is fully compatible with Python's standard uuid.UUID type. It includes optional extensions for Django ORM and Peewee, making it practical for use as a primary key in relational databases. No external dependencies are required.","worth_installing":"Yes, if you need sortable, collision-resistant IDs for databases or URLs and want zero external dependencies. The library is stable and well-tested, but note that maintenance is dormant (last update 2023-09-01). Not suitable for security-sensitive use (password tokens, API keys); use Python's secrets module for those. Be aware that time-encoded IDs can leak privacy information about when and where content was created."},"id":"timeflake","links":{"html":"https://skillfed.io/packages/timeflake","md":"https://skillfed.io/packages/timeflake.md","pypi":"https://pypi.org/project/timeflake/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2023-09-01","license_spdx":null,"license_treatment":"permissive","name":"timeflake","python_support":"unspecified","summary":"Timeflake is a 128-bit, roughly-ordered, URL-safe UUID. Inspired by Twitter's Snowflake, Instagram's ID and Firebase's PushID."},"popularity":{"monthly_downloads":190387,"position":9912,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.4.3"}
