Skip to content

Python 3 implementation of identicon.js-compatible Identicon.

License

Notifications You must be signed in to change notification settings

tinytengu/tinydenticon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tinydenticon

Preview Preview

Python 3 implementation of Identicon.

Specifically designed to produce the same results as identicon.js

Installation:

Pip:

pip3 install tinydenticon

Usage example:

from PIL import Image
from tinydenticon import Identicon


def main():
    text = "tinytengu"
    size = 500
    rounds = 1337

    identicon = Identicon(text.encode(), hash_rounds=rounds, image_side=size)

    image = Image.new("RGB", (size, size))
    image.putdata(identicon.get_pixels())
    image.show()


if __name__ == "__main__":
    main()

License

GNU GPL v3