Skip to main content

Tests PyPI version

Cute Snowflakes

Have you ever wanted cute 3x3 images from snowflake IDs? Great, because here they are!

Examples:

Installation

Requires Python 3.7+

pip install cutesnowflakes

Usage:

As a command line application:

cutesnowflakes.py encode 118999881999119725

cutesnowflakes.py decode folder/my_file.png

for more information and options use: cutesnowflakes.py encode --help or cutesnowflakes.py decode --help

Available colors for encoding are:

grey
red
green
blue
purple
magenta
yellow
orange

As a library:

## CREATING A SNOWFLAKE
from cutesnowflakes import encode, decode

# Create the snowflake
image, meta = encode("118999881999119725")
# Open it in the system photo viewer
image.show()
# Save the image with its metadata
image.save("my_image.png", pnginfo=meta)

## LOADING A SNOWFLAKE
from PIL.PngImagePlugin import PngImageFile

with PngImageFile("my_image.png") as fp:
    print(decode(fp))

## USING A DIFFERENT COLOR
from cutesnowflakes import Color

image, meta = encode("118999881999119725", Color.magenta)

# To decode with a specific color:
result = decode(fp, color = Color.magenta)

Changelog:

Legend:

+   : Added
-   : Removed
*** : Fixed
\   : Changed

1.0.1 (Current release)

*** Missing info in setup.py
\ Clarified version compatibilies in setup.py

1.0.0

+ Custom formatting
*** Decoding without metadata not using color parameter
\ Slight code improvements
\ Blackened code

0.4.0:

\\\ Major rewrite
+ __version__ import to __init__.py
+ New improved command line interface with Click
+ New docstrings
+ Logging
+ Added descriptive comments where useful
- CuteSnowflakes class
- Support for custom formatting (Temporarily)
\ Now requires Python 3.7 or higher
\ Improved old docstrings

0.3.0

+ __version__ to __init__.py
+ Error handling for set_mode()
+ Support for 19 and 20 digit snowflakes
+ Support for custom colors through command line --encode argument
\ Various minor code cleanups and improvements
\ Rename __usage() to print_usage()
\ Improved test suite
\ Improved type annotations
*** Possibility for integer overflows

0.2.1:

*** \ Various minor documentation and structure changes/fixes

0.2.0:

\ Move to a class instead of bare functions
\ Improved command line arguments
\ Moved version to setup.py
+ Multiple colors with set_mode() and format hint PngInfo

0.1.0:

+ Initial version

Metadata

Release files for cutesnowflakes 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cutesnowflakes 1.0.1
File Size Uploaded Provenance Actions
cutesnowflakes-1.0.1.tar.gz 5.0 kB Without provenance Details for cutesnowflakes-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cutesnowflakes 1.0.1
File Interpreter ABI Platform Actions
cutesnowflakes-1.0.1-py3-none-any.whl Python 3 none any Details for cutesnowflakes-1.0.1-py3-none-any.whl

Total release size: 10.4 kB

Release files / cutesnowflakes-1.0.1.tar.gz

Download URL cutesnowflakes-1.0.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
df3062e976eb99b083446cdb6c8237eb2607e08dedf67365c82231dc3f95eae4
BLAKE2b-256 checksum
How to use checksums
7ec1f01afe5a7fffe0693253ea0b769fe8bf530d83db96dd7cd98bfc1046d3d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

Release files / cutesnowflakes-1.0.1-py3-none-any.whl

Download URL cutesnowflakes-1.0.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65f8ba7fc359c420885ca2639183ff883bf946a5cd588e12751ab12a6a5dd74d
BLAKE2b-256 checksum
How to use checksums
c3ea7531bff7724ab77c19265d02c5d53b59c5f9ba5a4ada3b028c977236b4e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

Security for cutesnowflakes 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page