{"id":13501315,"url":"https://github.com/ibonn/python_avatars","last_synced_at":"2026-04-04T20:20:01.477Z","repository":{"id":42185750,"uuid":"345362425","full_name":"ibonn/python_avatars","owner":"ibonn","description":"Avatar generation package for Python","archived":false,"fork":false,"pushed_at":"2024-07-14T09:54:13.000Z","size":7920,"stargazers_count":76,"open_issues_count":2,"forks_count":18,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-29T08:09:45.976Z","etag":null,"topics":["avataaars","avatar","avatar-generation","avatar-generator","customizable","library","mit-license","open-source","package","python","python-avatars","svg"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/python-avatars","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ibonn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-07T14:06:51.000Z","updated_at":"2025-08-20T18:49:26.000Z","dependencies_parsed_at":"2024-06-19T17:40:04.030Z","dependency_job_id":"bb2d2dd6-8b76-4f69-9550-d91967a4c28d","html_url":"https://github.com/ibonn/python_avatars","commit_stats":{"total_commits":189,"total_committers":2,"mean_commits":94.5,"dds":"0.29100529100529104","last_synced_commit":"4be9ef51e5c5c4f1953a8f37941e353256869cf2"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ibonn/python_avatars","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibonn%2Fpython_avatars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibonn%2Fpython_avatars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibonn%2Fpython_avatars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibonn%2Fpython_avatars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ibonn","download_url":"https://codeload.github.com/ibonn/python_avatars/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ibonn%2Fpython_avatars/sbom","scorecard":{"id":479404,"data":{"date":"2025-08-11","repo":{"name":"github.com/ibonn/python_avatars","commit":"179ab470ab1a37e6d25091e83948ae1494ebc20f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/ibonn/python_avatars/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/ibonn/python_avatars/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/ibonn/python_avatars/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ibonn/python_avatars/python-publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:42","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:43","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T16:12:52.577Z","repository_id":42185750,"created_at":"2025-08-19T16:12:52.577Z","updated_at":"2025-08-19T16:12:52.577Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31412460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avataaars","avatar","avatar-generation","avatar-generator","customizable","library","mit-license","open-source","package","python","python-avatars","svg"],"created_at":"2024-07-31T22:01:32.920Z","updated_at":"2026-04-04T20:20:01.457Z","avatar_url":"https://github.com/ibonn.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# python_avatars\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/0f0ba4f148724111a40681296d0dc740)](https://www.codacy.com/gh/ibonn/python_avatars/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=ibonn/python_avatars\u0026amp;utm_campaign=Badge_Grade) ![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/ibonn/python_avatars) [![PyPi version](https://img.shields.io/pypi/v/python_avatars)](https://img.shields.io/pypi/v/python_avatars) ![PyPI - Downloads](https://img.shields.io/pypi/dm/python_avatars) ![GitHub top language](https://img.shields.io/github/languages/top/ibonn/python_avatars) \n\n[![Randomly generated avatars. (View at: https://github.com/ibonn/python_avatars/blob/main/examples/random_gif_apng/avatars.png)](https://raw.githubusercontent.com/ibonn/python_avatars/main/examples/random_gif_apng/avatars.png)](https://github.com/ibonn/python_avatars/blob/main/examples/random_gif_apng/avatars.png)\n\n\u003e Avatar library in Python\n\n## Table of contents\n1. [Features](#features)\n2. [Install](#install)\n3. [Usage](#usage)\n    * [Create your own avatar](#create-your-own-avatar)\n    * [Create a random avatar](#create-a-random-avatar)\n    * [Custom shirt text](#custom-shirt-text)\n    * [Expand the library](#expand-the-library)\n4. [License](#license)\n5. [Acknowledgments](#acknowledgments)\n\n## Features\n* Highly customizable. Design your own clothes, hair styles, eyes... and add them to the library copying the svg files into a directory\n* Vanilla Python. No external libraries needed\n* The library contains some colors for clothes, hair and skin and supports user defined colors using hex encoding\n* Pure SVG\n* Random avatar generation\n\n\n## Install\nUsing pip, from PyPi (latest stable release):\n\n    pip install python-avatars\n\nUsing pip, from this repository (May not be stable!):\n\n    git clone https://github.com/ibonn/python_avatars.git python_avatars\n    cd python_avatars\n    pip install -e .\n\n## Usage\n### Create your own avatar\n```python\nimport python_avatars as pa\n\nmy_avatar = pa.Avatar(\n    style=pa.AvatarStyle.CIRCLE,\n    background_color=pa.BackgroundColor.BLACK,\n    top=pa.HairType.STRAIGHT_2,\n    eyebrows=pa.EyebrowType.DEFAULT_NATURAL,\n    eyes=pa.EyeType.DEFAULT,\n    nose=pa.NoseType.DEFAULT,\n    mouth=pa.MouthType.EATING,\n    facial_hair=pa.FacialHairType.NONE,\n    # You can use hex colors on any color attribute...\n    skin_color=\"#00FFFF\",\n    # Or you can use the colors provided by the library\n    hair_color=pa.HairColor.BLACK,\n    accessory=pa.AccessoryType.NONE,\n    clothing=pa.ClothingType.HOODIE,\n    clothing_color=pa.ClothingColor.HEATHER\n)\n\n# Save to a file\nmy_avatar.render(\"my_avatar.svg\")\n```\n### Create a random avatar\n```python\nimport python_avatars as pa\n\n# Completely random avatar\nrandom_avatar_1 = pa.Avatar.random()\n\n# Completely random avatar except for the hat\nrandom_avatar_2 = pa.Avatar.random(top=pa.HatType.HAT)  # More attributes can stay fixed\n\n# Fixed avatar but random clothes\nrandom_avatar_3 = pa.Avatar(\n    style=pa.AvatarStyle.CIRCLE,\n    hair_color=pa.HairColor.BLACK,\n    accessory=pa.AccessoryType.NONE,\n    clothing=pa.ClothingType.pick_random(), # The clothes are chosen randomly\n)\n```\n\n### Custom shirt text\nWhen using the graphic shirt, - _ClothingType.GRAPHIC_ - you can set a custom text if you want to.\n\n```python\nimport python_avatars as pa\n\npa.Avatar(\n    style=pa.AvatarStyle.CIRCLE,\n    background_color='#FF00FF',\n    # Choose graphic shirt\n    clothing=pa.ClothingType.GRAPHIC_SHIRT,\n    clothing_color=pa.ClothingColor.GRAY_02,\n    # Important to choose this as shirt_graphic, otherwise shirt_text will be ignored\n    shirt_graphic=pa.ClothingGraphic.CUSTOM_TEXT,\n    shirt_text='Chess'\n).render(\"avatar_text.svg\")\n```\nwill output the file _avatar\\_text.svg_:\n\n[![Avatar wearing shirt with custom text. (View at: https://github.com/ibonn/python_avatars/blob/main/examples/shirt_text/avatar_text.svg)](https://raw.githubusercontent.com/ibonn/python_avatars/main/examples/shirt_text/avatar_text.svg)](https://github.com/ibonn/python_avatars/blob/main/examples/shirt_text/avatar_text.svg)\n\n### Expand the library\nSuppose you have a file called _suit.svg_\nthat looks like this\n\n[![Suit ready to be used by the avatar. (View at: https://github.com/ibonn/python_avatars/blob/main/examples/install/suit.svg)](https://raw.githubusercontent.com/ibonn/python_avatars/main/examples/install/suit.svg)](https://github.com/ibonn/python_avatars/blob/main/examples/install/suit.svg)\n\nYou can add it to the library just by running\n```python\nfrom python_avatars import install_part\n\n# Install the new part\ninstall_part(\"suit.svg\", pa.ClothingType)\n```\nAnd then use it\n```python\nsuit_avatar = pa.Avatar.random(\n    clothing=pa.ClothingType.SUIT\n)\n\nsuit_avatar.render(\"suit_avatar.svg\")\n```\nWhich outputs the file _suit\\_avatar.svg_ that looks like this\n\n[![Randomly generated avatar wearing the installed suit. (View at: https://github.com/ibonn/python_avatars/blob/main/examples/install/avatar_suit.svg)](https://raw.githubusercontent.com/ibonn/python_avatars/main/examples/install/avatar_suit.svg)](https://github.com/ibonn/python_avatars/blob/main/examples/install/avatar_suit.svg)\n\nThe name of the newly added value will be exactly the name of the svg file converted to uppercase replacing all non alphanumeric chars with underscores and removing all leading digits.\n\nUninstalling the installed part is as easy as installing it\n```python\nfrom python_avatars import uninstall_part, ClothingType\n\nuninstall_part(ClothingType.SUIT, confirm=False)    # confirm=False will not prompt for confirmation\n```\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details\n\n## Acknowledgments\n* Avatars designed by [Pablo Stanley](https://twitter.com/pablostanley) ([https://avataaars.com/](https://avataaars.com/))\n* Additional avatar parts from blush.design, designed by [Pablo Stanley](https://twitter.com/pablostanley) ([https://blush.design/](https://blush.design/collections/rChdrB8vX8xQJunpDPp8/avatars/avataaar-default))","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibonn%2Fpython_avatars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibonn%2Fpython_avatars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibonn%2Fpython_avatars/lists"}