Skip to main content

Cute 3x3 images from snowflake IDs

Project description

Tests

(Note) Currently MacOS tests are failing under Python 3.9

Cute Snowflakes

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

Installation

Requires Python 3.6+

pip install cutesnowflakes

Usage:

As a command line application:

cutesnowflakes.py --encode 118999881999119725 red

cutesnowflakes.py --decode folder/my_file.png

As a library:

## CREATING A SNOWFLAKE
from cutesnowflakes import CuteSnowflakes

flake = CuteSnowflakes()

# Create the snowflake
image, meta = flake.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(flake.decode(fp))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cutesnowflakes-0.2.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

cutesnowflakes-0.2.1-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page