{"id":15661308,"url":"https://github.com/sachinraja/simple-icons-py","last_synced_at":"2025-06-24T19:42:13.866Z","repository":{"id":36972230,"uuid":"325670182","full_name":"sachinraja/simple-icons-py","owner":"sachinraja","description":"python wrapper for simple-icons","archived":false,"fork":false,"pushed_at":"2025-03-11T22:20:49.000Z","size":2011,"stargazers_count":21,"open_issues_count":12,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-15T13:03:23.344Z","etag":null,"topics":["icons","python","simple-icons","svg","svg-icons","svgs"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/simpleicons/","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/sachinraja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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},"funding":{"github":"sachinraja"}},"created_at":"2020-12-30T23:39:34.000Z","updated_at":"2025-01-13T02:27:36.000Z","dependencies_parsed_at":"2024-01-15T05:07:08.985Z","dependency_job_id":"d5a5f5f7-cf64-4e4d-b84b-4985d70d820f","html_url":"https://github.com/sachinraja/simple-icons-py","commit_stats":{"total_commits":191,"total_committers":8,"mean_commits":23.875,"dds":0.6178010471204188,"last_synced_commit":"41a3de872899c86651d0288be6d6781b0fdc44c5"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachinraja%2Fsimple-icons-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachinraja%2Fsimple-icons-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachinraja%2Fsimple-icons-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sachinraja%2Fsimple-icons-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sachinraja","download_url":"https://codeload.github.com/sachinraja/simple-icons-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243732297,"owners_count":20338837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["icons","python","simple-icons","svg","svg-icons","svgs"],"created_at":"2024-10-03T13:26:59.011Z","updated_at":"2025-03-17T16:11:06.407Z","avatar_url":"https://github.com/sachinraja.png","language":"Python","funding_links":["https://github.com/sponsors/sachinraja"],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\n  \u003cimg src=\"logo.svg\" alt=\"Logo\" width=\"50\" height=\"50\"\u003e\n  simpleicons\n\u003c/h1\u003e\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nUse a wide-range of icons derived from the [simple-icons](https://github.com/simple-icons/simple-icons) repo in python. Go to [their website](https://simpleicons.org/) for a full list of icons. The slug version must be used for the `icon_name`. The icons folder that accompanies the package has all the files. The package uses the latest verison of [Simple Icons](https://github.com/simple-icons/simple-icons/releases/latest). It does **not** depend on the filesystem.\n\n## Installation\n\nInstall with `pip install simpleicons`. Keep in mind that this is a fairly large package due to all the icons.\n\n## Usage\n\n### General Usage\n\nThe API can then be used as follows, where [ICON SLUG] is replaced by a slug:\n\n```py\nfrom simpleicons.all import icons\n\n# Get a specific icon by its slug as:\nicons.get('[ICON SLUG]')\n\n# For example:\nicon = icons.get('simpleicons')\n\nprint(icon.__dict__)\n\n\"\"\"\n{\n    'title': 'Simple Icons',\n    'slug': 'simpleicons',\n    'hex': '111111',\n    'source': 'https://simpleicons.org/',\n    'svg': '\u003csvg role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"\u003e...\u003c/svg\u003e',\n    'path': 'M12 12v-1.5c-2.484 ...',\n    'guidelines': 'https://simpleicons.org/styleguide',\n    'license': {\n        type: '...',\n        url: 'https://example.com/'\n    }\n}\n\"\"\"\n```\n\nNOTE: The `guidelines` entry will be `None` if we do not yet have guidelines data for the icon.\n\nNOTE: The `license` entry will be `None` if we do not yet have license data for the icon.\n\nAlternatively you can import the needed icons individually, where [ICON SLUG] is replaced by a slug:\n\n```py\n# Import a specific icon by its slug as:\nfrom simpleicons.icons import si_[ICON_SLUG]\n\n# For example:\nfrom simpleicons.icons import si_simpleicons\n```\n\nLastly, the `icons` object is also enumerable. This is useful if you want to do a computation on every icon:\n\n```py\nfrom simpleicons.all import icons\n\nfor (key, icon in icons) {\n    # do stuff\n}\n```\n\n### XML\n\nThe XML for each icon can be easily manipulated with either of two functions:\n\n`Icon.get_xml(**attrs) -\u003e ElementTree`\n\n```py\nfrom simpleicons.icons import si_simpleicons\n\n# blue logo, adds the fill attribute: \u003csvg fill=\"blue\"\u003e\u003c/svg\u003e\nsi_simpleicons.get_xml(fill=\"blue\")\n```\n\n`Icon.get_xml_bytes(**attrs) -\u003e bytes`\n\n```py\nfrom simpleicons.icons import si_simpleicons\n\nsi_simpleicons.get_xml_bytes(fill=\"blue\")\n```\n\n### Image\n\nIn order to use this, you must install the extras: `pip install -e simpleicons[imaging]` . Icons can be converted to PIL Images with `icon_to_image(icon_xml: bytes, bg: int=0xffffff, scale: Tuple[int, int]=(1, 1)) -\u003e Image`:\n\n```py\nfrom simpleicons.icons import si_simpleicons\nfrom simpleicons.image import icon_to_image\n\nxml_bytes = si_simpleicons.get_xml_bytes(fill=\"blue\")\n\n# black background and 5x scale\nimg = icon_to_image(xml_bytes, bg=0x000000, scale=(5, 5))\n\n# manipulate PIL Image\nimg.putalpha(32)\nimg.save(\"simpleicons_blue.png\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachinraja%2Fsimple-icons-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsachinraja%2Fsimple-icons-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsachinraja%2Fsimple-icons-py/lists"}