Skip to main content

simplepycons

PyPI Simple Icons version Latest Simple Icons Release License pdm-managed

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simplepycons-1!16.26.0.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplepycons-1!16.26.0-py3-none-any.whl (5.3 MB view details)

Uploaded Python 3

File details

Details for the file simplepycons-1!16.26.0.tar.gz.

File metadata

  • Download URL: simplepycons-1!16.26.0.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1018-azure

File hashes

Hashes for simplepycons-1!16.26.0.tar.gz
Algorithm Hash digest
SHA256 3d165d7a73c934c96d672273eac0fabfeb454f04d6f31f1d2a7847183783c664
MD5 a50f053da71942dd325fe4ba22ac6425
BLAKE2b-256 ed4a7563fcd61433f418a81064d82cd3d1de0fe804047f666773535ec9aa4bd2

See more details on using hashes here.

File details

Details for the file simplepycons-1!16.26.0-py3-none-any.whl.

File metadata

  • Download URL: simplepycons-1!16.26.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1018-azure

File hashes

Hashes for simplepycons-1!16.26.0-py3-none-any.whl
Algorithm Hash digest
SHA256 896d601fb8b54774256e51a36ce30c2bcbf408c068845a616cfdd7d8c27ad7ca
MD5 9e2e3ca09a032334d97b54dc1373c91e
BLAKE2b-256 e5e602406fb574357258f5fe38af063f61d26f8f8e8a74a445f04f017eeae842

See more details on using hashes here.

Release history Release notifications | RSS feed

1!16.28.0

2 files

1!16.27.1

2 files

1!16.27.0

2 files

This release

1!16.26.0 This release

2 files

1!16.25.0

2 files

1!16.24.1

2 files

1!16.24.0

2 files

1!16.23.0

2 files

1!16.22.0

2 files

1!16.21.0

2 files

1!16.20.0

2 files

1!16.19.0

2 files

1!16.18.0

2 files

1!16.17.0

2 files

1!16.16.0

2 files

1!16.15.0

2 files

1!16.14.0

2 files

1!16.13.0

2 files

1!16.12.0

2 files

1!16.11.0

2 files

1!16.10.0

2 files

1!16.9.0

2 files

1!16.8.0

2 files

1!16.7.0

2 files

1!16.6.1

2 files

1!16.6.0

2 files

1!16.5.0

2 files

1!16.4.0

2 files

1!16.3.0

2 files

1!16.2.0

1 file

1!16.1.0

1 file

1!16.0.0

1 file

1!15.22.0

1 file

1!15.20.0

2 files

1!15.19.0

2 files

1!15.18.0

2 files

1!15.17.0

2 files

1!15.16.1

2 files

1!15.16.0

2 files

1!15.15.0

2 files

1!15.14.0

2 files

1!15.13.0

2 files

1!15.12.0

2 files

1!15.11.0

2 files

1!15.10.0

2 files

1!15.9.0

2 files

1!15.8.0

2 files

1!15.6.0

1 file

1!15.5.0

1 file

1!15.4.0

1 file

1!15.3.0

1 file

1!15.2.0

1 file

1!15.1.0

1 file

1!15.0.0

1 file

1!14.15.0

1 file

1!14.14.0

1 file

1!14.13.0

1 file

1!14.12.3

1 file

1!14.12.2

1 file

1!14.12.1

1 file

1!14.12.0

1 file

1!14.11.1

1 file

1!14.11.0

1 file

1!14.10.0

1 file

1!14.9.0

1 file

1!14.8.0

1 file

1!14.7.0

1 file

1!14.6.0

1 file

1!14.5.0

1 file

1!14.4.0

1 file

1!14.3.0

1 file

1!14.2.0

1 file

1!14.1.0

1 file

1!14.0.1

1 file

1!14.0.0

1 file

1!13.21.0

1 file

1!13.20.0

1 file

1!13.19.0

1 file

1!13.18.0

1 file

1!13.17.0

1 file

1!13.16.0

1 file

1!13.15.0.post1

1 file

1!13.14.1

1 file

1!13.14.0

1 file

1!13.13.0

1 file

1!13.12.0

1 file

1!13.11.0

1 file

1!13.10.0

1 file

1!13.9.0

1 file

1!13.8.0

1 file

1!13.7.0

1 file

1!13.6.0

1 file

1!13.5.0

1 file

1!13.4.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page