tinydenticon

identicon.js compatible Identicon implementation in Python 3


Keywords
hash, identicon, identicon-generator, identicon-library, pil, pillow, python, python3, sha
License
GPL-3.0-only
Install
pip install tinydenticon==0.1.2

Documentation

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