--- id: snowflake-id version: "1.0.2" license: MIT License Copyright (c) 2021-2024 Vd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in… (full text in the JSON record) license_treatment: permissive maintenance: dormant --- # snowflake-id — The Snowflake generator done right License: permissive · Maintenance: dormant · Downloads: 172.7K/mo ## What it is and what it does Snowflake-id is a pure-Python implementation of Snowflake ID generation and parsing. Snowflake IDs are distributed identifiers that encode a timestamp, instance identifier, and sequence number, making them suitable for generating unique IDs across multiple machines without central coordination. The package provides a SnowflakeGenerator class to produce sequential IDs and a Snowflake class to parse existing IDs back into their component parts (timestamp, instance, epoch, sequence, and datetime). It has no additional dependencies and supports Python 3.8, 3.9, 3.10, 3.11, and 3.12. The package is straightforward to use: instantiate a generator with an instance ID, call next() to get sequential IDs, or parse an existing ID to inspect its components. The fact sheet shows examples of generating IDs in sequence and extracting timestamp and datetime information from a parsed ID. Maintenance is dormant but the code is marked Production/Stable and has not been archived. Use it for: - Generate unique IDs for distributed database records without a central ID service. - Parse existing Snowflake IDs to extract their timestamp and instance metadata. - Reconstruct a generator's state from a previously generated ID to continue the sequence. - Build microservice architectures where each instance generates its own unique IDs. - Replace UUID generation when sortable, time-ordered IDs are preferred. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates and parses Snowflake IDs, distributed unique identifiers composed of timestamp, instance, and sequence components. Yes, if you need distributed ID generation without external dependencies. The package is lightweight, has no runtime dependencies, and is marked Production/Stable. Dormant maintenance (last commit 2024-06-12) is not a blocker for a stable utility library, but verify it meets your concurrency and performance requirements before adopting in high-throughput systems. ## Install pip install snowflake-id uv add snowflake-id poetry add snowflake-id ## Installing snowflake-id Before you install: Low friction: pure Python, no runtime dependencies, distributed as a wheel. Maintenance is dormant—last commit 2024-06-12, but the repository is not archived and the package is marked Production/Stable. License in practice: MIT License permits unrestricted use, modification, and distribution with only attribution and liability disclaimer required. No restrictions on commercial or proprietary use. Quickstart: pip install snowflake-id from snowflake import SnowflakeGenerator gen = SnowflakeGenerator(42) for i in range(3): print(next(gen)) Requires Python 3.8 or above. Verify before relying: - Whether the package handles clock skew or out-of-order generation in concurrent scenarios. - Performance characteristics under high-throughput ID generation. - Compatibility with distributed systems beyond the basic generator/parser interface shown. ## Package facts - License: MIT License Copyright (c) 2021-2024 Vd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 172.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags snowflake id generator, distributed unique id, snowflake id parser, timestamp-based id generation, sequence number generator, instance-based id, snowflake id decode, id-generation, distributed-systems [View on SkillFed](https://skillfed.io/packages/snowflake-id) · [View on PyPI](https://pypi.org/project/snowflake-id/)