Skip to main content

Create icons for user interfaces directly from your Python code.

Project description

iconipy

Say goodbye to the tedious hassle of graphic programs! Now you can create stunning icons directly from your code. With the look and feel defined right in the code, adjustments are a breeze. Plus, the included icon sets can easily be expanded with your own sets based on font files. 🎨✨

Installation

pip install iconipy

Usage

First you initialize an "IconFactory" with an icon set and look-and-feel settings like this:

from iconipy import IconFactory 

create_button_icon = IconFactory(
                        icon_set = 'lucide', 
                        icon_size = (64,64), # Providing just an integer would produce a square icon 
                        font_size = 38,  
                        font_color = (0, 0, 0, 255), # Solid black in RGBA format (R, G, B, A)
                        outline_color = 'dimgrey',   # Color names are also supported
                        outline_width = 6,
                        background_color = 'silver', 
                        background_radius = 10
) 

Then you create your icons:

icon_home = create_button_icon.asPil('house') # PIL Image
icon_reload = create_button_icon.asQPixmap('refresh-cw') # Qt based frameworks
icon_files = create_button_icon.asTkPhotoImage('files') # tkinter, ttkbootstrap, PySimpleGUI, FreeSimpleGUI
icon_exit_app = create_button_icon.asRawList('log-out') # DearPyGUI

Depending on your GUI toolkit's whims, you can create PIL Image Objects, ByteIO Objects, Byte-Strings, Raw Pixel Lists, TkPhotoImage Objects, QImage Objects, save to file, and more.

You need to preview an icon? Here we go:

create_button_icon.show('house')

The icon sets you can choose from include: lucide, boxicons, ligature_symbols, lineicons, material_icons_regular, material_icons_round_regular, material_icons_sharp_regular, material_icons_outlined_regular, microns and typicons.

Feeling adventurous? Dump all the icons to your hard drive and explore:

create_button_icon.saveAll(<path to target directory>)

You need a hand? Check what the icon set has to offer:

print(create_button_icon.search('hand'))

Just want a list with all icon names? No problem:

print(create_button_icon.icon_names)

More info

Visit https://github.com/digidigital/iconipy or https://iconipy.digidigital.de for sample code for the most popular GUI toolkits and detailed documentation.

Project details


Download files

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

Source Distribution

iconipy-0.5.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

iconipy-0.5.1-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file iconipy-0.5.1.tar.gz.

File metadata

  • Download URL: iconipy-0.5.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for iconipy-0.5.1.tar.gz
Algorithm Hash digest
SHA256 b8cd857df65d693f54f30c13b8af271726f282f25d1eaa23bdfa748cf21ffc8c
MD5 530974dba166993dde104677844295af
BLAKE2b-256 32067bcfff70b958d83d8574da66380462e93da464d2747ce078595f08fca405

See more details on using hashes here.

File details

Details for the file iconipy-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: iconipy-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for iconipy-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c2b92b675655c42ca2e4088deed5ff867fe0d682af245e00e30df395d94e5a0
MD5 2f830636fb7bd6e854eac3d5194f831e
BLAKE2b-256 5d10ef97e253781ad65567ef7e3826c98aa88ba05b42c508fde0e0f8b3e4b4f3

See more details on using hashes here.

Supported by

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