simplepycons
Python wrappers for simple-icons inspired by the wonderful work of sachinraja.
As latter project seems to be no longer maintained, this project starts as being compatible to simple-icons 13.x
Usage
The simplepycons namespace contains the following types:
- Icon: The basic icon class, from which all Icons are inherited. It is abstract and hence cannot be inherited.
- all_icons: A collection of all icons found.
- IconFactory: A simple wrapper providing a callable interface and a prototype.
as well as a class for each icon provided.
So, you can run:
from simplepycons import all_icons, PythonIcon
icon1 = PythonIcon()
icon2 = all_icons.get_python_icon()
icon3 = all_icons["python"]
All calls should provide a new Icon instance of the python icon.
For all simple-icons, a get icon method is provided using the name of the icon.
An instance of Icon offers the following properties:
- name (str): The name of the icon, i.e. the name of the simple-icon id.
- original_file_name (str): The name of the file it was created from.
- title (str): The name of the brand
- primary_color (str): The primary color of the brand.
- raw_svg (str): The RAW SVG graphics as string.
- guidelines_url (str | None): The url to the usage guidelines (optional).
- license (tuple[str | None, str | None]): The license as a tuple. The first element is the SPDX identifier, the second element is the URL to the license document (optional).
- source (str): The source URL of the icon.
- aliases (Iterable[str]): A list of aliases used as alternative titles
An instance of Icon offers the following methods:
- svg_tree() (xml.ElementTree.Element): The SVG as XML Element
- customize_svg(**svg_attr: str) (xml.ElementTree.Element): The SVG with custom attributes on the root node.
- customize_svg_as_bytes(**svg_attr: str) (bytes): The SVG with custom attributes on the root node, converted to a bytes object.
- customize_svg_as_str(**svg_attr: str) (str): The SVG with custom attributes on the root node, converted to string.
- customize_svg_as_data_url_(**svg_attr: str) (str): The SVG with custom attributes on the root node, converted to a base64 encoded data url.
The svg_attr keyword arguments can be used to add any arbitrary svg attribute to the SVG root node. If fill is not used, the primary_color is used.
Metadata
Release files for simplepycons 1!16.34.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| simplepycons-1!16.34.0.tar.gz | 2.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simplepycons-1!16.34.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 MB
Release files / simplepycons-1!16.34.0.tar.gz
| Download URL | simplepycons-1!16.34.0.tar.gz |
|---|---|
| Size | 2.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d534760e34dc52212ab516343af7ce9178a32d6a314710717a578723a9dd304a
|
|
BLAKE2b-256 checksum How to use checksums |
56cad40bcae1332afb669b4ece4e74e37c0cc4558f121f546bf2a548c741d985
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure
|
Release files / simplepycons-1!16.34.0-py3-none-any.whl
| Download URL | simplepycons-1!16.34.0-py3-none-any.whl |
|---|---|
| Size | 5.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
999ee8b32444ac576317a4a6548e688b38ff017f11d03cf20ce64b4b31e69aa2
|
|
BLAKE2b-256 checksum How to use checksums |
53e91161f73e22902c669dc72ad77ff6e074ef75a91bd455df4da3a0ecdba8b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure
|