{ "info": { "author": "LexSerest", "author_email": "lexserest@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# CustomIdenticon\n\n![image](https://user-images.githubusercontent.com/22620605/53684108-2c1c3180-3d1a-11e9-84ca-64547fb6ad51.png)\n\nPython library for generate a variety of identicons. \n\n[![image](https://travis-ci.org/LexSerest/customidenticon.svg?branch=master)](https://travis-ci.org/LexSerest/customidenticon)\n\n## Features\n\n- 3 different types of identicons\n- change the final image size (size of elements, number of elements)\n- change border size\n- change background color \n- change the transparency of elements\n- change the output format (PNG, JPEG, etc.)\n- choice of hashing algorithm (including your own)\n\n\n## Installation\n\n`pip install customidenticon`\n\n## Usage\nEnd image size = size * block_size + border * 2\n```python\nimport customidenticon\nidenticon = customidenticon.create(\n \"Test data\", # Data\n type=\"pixels\", # Type of algorithm (pixels, blocks or layers)\n format=\"png\", # Output format\n salt=\"\", # salt for more variants\n background=\"#f0f0f0\", # background color\n block_visibility=140, # transparency of elements in the image (0-255)\n block_size=30, # size of elements (px)\n border=25, # border (px)\n size=5, # number of elements\n hash_func=None # hash function (auto)\n)\n\n```\n\n### Save \n```python\nimport customidenticon\nidenticon = customidenticon.create(\"Test data\", size=5)\n# identicon = b\"\\x89PNG\\r\\n\\x1a\\n\\x00\\x00\\x00...\"\n\n# save to file\nwith open(\"identicon.png\", \"wb\") as f:\n f.write(identicon)\n\n# to image\nimport io\nfrom PIL import Image\nimage = Image.open(io.BytesIO(identicon))\n```\n\n## Hash algorithm\nUse `hashlib` for change algorithm\n```python\nimport hashlib\nimport customidenticon\nidenticon = customidenticon.create(\"Test data\", hash_func=hashlib.sha3_256)\n```\nExample custom hash algorithm\n```python\nimport customidenticon\nclass MySuperHashAlgorithm:\n def __init__(self, *args):\n pass\n def hexdigest(self):\n return \"0\"*200\n\nidenticon = customidenticon.create(\"Test data\", hash_func=MySuperHashAlgorithm)\n```\n\n## Examples\n\n```python\nimport customidenticon\n# Create github-like (5x5)\nidenticon1 = customidenticon.create(\"Test\") # 200x200px (default for all)\n# or\nidenticon1 = customidenticon.create(\"Test\", type=\"pixels\") \n\n# Create \"pixels\" type (6x6)\n# End image size 200x200px (6 * 25 + 25 * 2)\nidenticon2 = customidenticon.create(\"Test\", size=6, block_size=25) \n\n# Create \"layers\" type (3 layer)\n# End image size 200x200px (default size = 3 and block_size = 50)\nidenticon4 = customidenticon.create(\"Test\", type=\"layers\")\n\n# Create \"layers\" type (8 layer)\n# End image size 200x200px (8 * 20 + 20 * 2)\nidenticon5 = customidenticon.create(\"Test\", type=\"layers\", size=8, block_size=20, border=20)\n\n# Create \"blocks\" type (3x3) (200x200px)\nidenticon6 = customidenticon.create(\"Test\", type=\"block\", block_visibility=100)\n```\n\n\n##### Result \n![image](https://user-images.githubusercontent.com/22620605/53685533-0c423900-3d2d-11e9-89e0-e3cc7bfa7548.png)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lexserest/customidenticon", "keywords": "identicon image avatar profile github custom customidenticon", "license": "MIT", "maintainer": "LexSerest", "maintainer_email": "lexserest@gmail.com", "name": "customidenticon", "package_url": "https://pypi.org/project/customidenticon/", "platform": "", "project_url": "https://pypi.org/project/customidenticon/", "project_urls": { "Homepage": "https://github.com/lexserest/customidenticon" }, "release_url": "https://pypi.org/project/customidenticon/0.1.5/", "requires_dist": [ "pillow" ], "requires_python": "", "summary": "Python3 library for generate a variety of identicons", "version": "0.1.5" }, "last_serial": 4951092, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "431f58db8d4d538f1476e718970d3e13", "sha256": "82144470b5d509dbd8f1bbe62239e45f42c2c9212d64611d3d2f085ee17367ca" }, "downloads": -1, "filename": "customidenticon-0.1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "431f58db8d4d538f1476e718970d3e13", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4675, "upload_time": "2019-03-02T19:15:56", "url": "https://files.pythonhosted.org/packages/ba/ba/f8307467eb81df9512d7bea59a1ccf8072d0c4cf8a7e54e2505536e50245/customidenticon-0.1.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8427db39feba1fa221c04f9ed43ba56a", "sha256": "4a2331bde85dfb3ca79a3b928d0f84da7c68c7e64c1ba18729ae1e1256e39c48" }, "downloads": -1, "filename": "customidenticon-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8427db39feba1fa221c04f9ed43ba56a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3890, "upload_time": "2019-03-02T19:15:58", "url": "https://files.pythonhosted.org/packages/78/43/ba4ade5a36d14a9bdadb1c7b1f05a6d071cdc8717101ee63765c4acec395/customidenticon-0.1.2.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "bf23300e570df1a8bc0325ead9d5e122", "sha256": "a49d288a2adc466f4feed7b49cf9691a8d9699d01892c810e70aab4a237f30cb" }, "downloads": -1, "filename": "customidenticon-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "bf23300e570df1a8bc0325ead9d5e122", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4673, "upload_time": "2019-03-17T19:13:33", "url": "https://files.pythonhosted.org/packages/f5/b1/6be651171554536b7b0eb9da567c746f587a463e6fe453071bf2c351288b/customidenticon-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e81256fb5906556f0facb516b9dc4d21", "sha256": "c5d50ff29f28230ecc7299eb27dd349e8e30e72761c7335505083b4f871f70f4" }, "downloads": -1, "filename": "customidenticon-0.1.5.tar.gz", "has_sig": false, "md5_digest": "e81256fb5906556f0facb516b9dc4d21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3895, "upload_time": "2019-03-17T19:13:36", "url": "https://files.pythonhosted.org/packages/7a/ce/3cd490ec7443f53a27e6981f523eb7be1a04c87d6c60d5906f4de80e79a7/customidenticon-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bf23300e570df1a8bc0325ead9d5e122", "sha256": "a49d288a2adc466f4feed7b49cf9691a8d9699d01892c810e70aab4a237f30cb" }, "downloads": -1, "filename": "customidenticon-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "bf23300e570df1a8bc0325ead9d5e122", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4673, "upload_time": "2019-03-17T19:13:33", "url": "https://files.pythonhosted.org/packages/f5/b1/6be651171554536b7b0eb9da567c746f587a463e6fe453071bf2c351288b/customidenticon-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e81256fb5906556f0facb516b9dc4d21", "sha256": "c5d50ff29f28230ecc7299eb27dd349e8e30e72761c7335505083b4f871f70f4" }, "downloads": -1, "filename": "customidenticon-0.1.5.tar.gz", "has_sig": false, "md5_digest": "e81256fb5906556f0facb516b9dc4d21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3895, "upload_time": "2019-03-17T19:13:36", "url": "https://files.pythonhosted.org/packages/7a/ce/3cd490ec7443f53a27e6981f523eb7be1a04c87d6c60d5906f4de80e79a7/customidenticon-0.1.5.tar.gz" } ] }