Registry / serialization / snowflake-legacy

snowflake-legacy

JSON →
library1.0.3pypypi✓ verified 24d ago

The `snowflake-legacy` package (current version 1.0.2) is a transitional Python library providing limited backward compatibility for users of the *original* `snowflake` PyPI package, which has since been renamed to `snowflake-uuid`. The original package was designed for generating persistent, machine-specific UUIDs (often referred to as 'snowflakes'). This `snowflake-legacy` package itself is deprecated, primarily serving as a temporary bridge after the `snowflake` PyPI name was transferred to Snowflake, Inc. Users are strongly advised to migrate to `snowflake-uuid` for continued functionality and support. It has an effectively abandoned release cadence.

pip install snowflake-legacy
INSTALL
IMPORT
SIG · SNOWFLAKE-LEGACY
S
snowflake-legacy
serializationpythonv1.0.3
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

snowflake
import snowflake
from snowflake import snowflake
The `snowflake-legacy` package provides an `import snowflake` that mimics the top-level `snowflake` module of the original package. Direct import of `snowflake()` from `snowflake` might imply a function, but it's a module-level callable.

Demonstrates how to use the `snowflake-legacy` package to read a machine's snowflake ID. Note that this package does not generate IDs; it only reads them, typically from `/etc/snowflake`, which would usually be created by the `snowflake-uuid` package. It will raise a `FileNotFoundError` if the ID file doesn't exist. The `make_snowflake()` function is explicitly disabled.

import snowflake import os # This package only *reads* a snowflake ID from a file, typically /etc/snowflake. # It does NOT generate one. For generation, use 'snowflake-uuid'. # The ID is usually created by the 'snowflake-uuid' package upon installation. # This example attempts to read it, but will raise FileNotFoundError if not present. try: # Attempt to read the machine's snowflake ID # In a real scenario, this would likely read from /etc/snowflake # after the `snowflake-uuid` package has been installed and created it. # For demonstration, we use a temporary file path if /etc/snowflake isn't available. snowflake_id = snowflake.snowflake(os.environ.get('SNOWFLAKE_ID_PATH', '/etc/snowflake')) print(f"Machine Snowflake ID: {snowflake_id}") except FileNotFoundError: print("No snowflake ID found. The 'snowflake-legacy' package only reads IDs; it does not generate them.") print("Please install 'snowflake-uuid' package (pip install snowflake-uuid) to generate an ID.") except NotImplementedError as e: print(f"Error: {e}") except Exception as e: print(f"An unexpected error occurred: {e}")
Debug
Known issues
breakingThe `make_snowflake()` function, if present in the original `snowflake` package, is explicitly disabled in `snowflake-legacy` and will always raise a `NotImplementedError`, directing users to the `snowflake-uuid` package.
fix
Migrate to `snowflake-uuid` and use its API for generating new snowflake IDs.
affects: 1.0.0 and later
deprecatedThe `snowflake-legacy` package itself is a temporary, transitional package and is explicitly recommended to be replaced by `snowflake-uuid`. It is unlikely to receive further maintenance or updates.
fix
Update your project dependencies from `snowflake-legacy` to `snowflake-uuid` as soon as possible.
affects: All versions
gotchaThe `snowflake.snowflake()` function in `snowflake-legacy` only *reads* an existing snowflake ID from a file (defaulting to `/etc/snowflake`); it does not create or generate a new ID. If the file does not exist, it will raise a `FileNotFoundError`.
fix
Ensure that the `snowflake-uuid` package is installed and has run at least once to create the `/etc/snowflake` file if you intend to use `snowflake-legacy` to read it. For generation, switch to `snowflake-uuid`.
affects: All versions
gotchaThere is a completely unrelated, official `snowflake` package on PyPI owned by Snowflake, Inc. (the data warehousing company). Users attempting to install the ID generation library by searching 'snowflake' and installing the first result may get the wrong package, leading to confusion.
fix
Always explicitly install `snowflake-uuid` for machine-specific UUID generation, or `snowflake-legacy` if specifically targeting the deprecated transitional package.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'snowflake'
The original `snowflake` package for UUID generation was renamed to `snowflake-uuid`. This error occurs when trying to `import snowflake` without having the `snowflake-uuid` package installed or correctly aliased, or if the deprecated `snowflake-legacy` is installed but `import snowflake_legacy` is not used.
fix
To generate UUIDs, install `snowflake-uuid` (`pip install snowflake-uuid`) and use `import snowflake_uuid`. If you intended to use the deprecated legacy bridge, ensure it's installed (`pip install snowflake-legacy`) and use `import snowflake_legacy`.
AttributeError: module 'snowflake' has no attribute 'generate'
The user has likely installed `snowflake-connector-python` (which often occupies the `snowflake` PyPI name) and is attempting to call methods like `generate()` that belong to the `snowflake-uuid` (or original `snowflake`) package for UUID generation.
fix
The `generate()` function is part of the `snowflake-uuid` package. Install it (`pip install snowflake-uuid`) and use `snowflake_uuid.generate()`. If you need to maintain the `snowflake` alias for compatibility with older code, use `import snowflake_uuid as snowflake`.
ModuleNotFoundError: No module named 'snowflake_legacy'
The `snowflake-legacy` package was not installed in the current Python environment, or there is a typo in the import statement.
fix
Install the package using `pip install snowflake-legacy` and ensure your import statement is `import snowflake_legacy`.
Upgrade
Version history
1.0.3latest on PyPI · released Aug 10, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
Resources