snowflake-id
The Snowflake generator done right
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 on this page — 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
snowflake-id on PyPI
pip
pip install snowflake-iduv
uv add snowflake-idpoetry
poetry add snowflake-idInstalling 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 the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 849 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 172,686/month — #10,328 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: snowflake_id-1.0.2-py3-none-any.whl
Keywords: snowflake, snowflake-id, id, ids, generator
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
ulid-pyGenerates and parses ULIDs (Universally Unique…
permissive · top 5,000 on PyPI
ulidGenerates ULIDs (Universally Unique…
permissive · top 15,000 on PyPI
cuidGenerates fast, sequentially-ordered unique…
permissive · top 5,000 on PyPI
sqidsSqids encodes numbers into short, unique,…
permissive · top 15,000 on PyPI
snowflake-cliSnowflake CLI is a command-line tool for…
permissive · top 5,000 on PyPI
snowflake-sqlalchemySnowflake SQLAlchemy is a SQLAlchemy dialect…
permissive · top 1,000 on PyPI
snowflake.coreProvides Python access to Snowflake entity…
permissive · top 5,000 on PyPI
pulumi-snowflakeA Pulumi resource provider that lets you…
permissive · top 15,000 on PyPI
snowflakeUnified Python API for Snowflake workloads,…
permissive · top 5,000 on PyPI
snowflake-cli-labsThis package has been renamed and is now a…
permissive · top 15,000 on PyPI