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, 
                        font_size = 38,  
                        font_color = (0, 0, 0, 255), # black solid
                        outline_color = 'dimgrey', 
                        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, lineicons, material_icons_regular, material_icons_round_regular, material_icons_sharp_regular, and material_icons_outlined_regular.

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.3.0.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

iconipy-0.3.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: iconipy-0.3.0.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for iconipy-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3872f3b4e52edcd08fb771f46aaf9720d019a991d46d1ab197010b127c0df52c
MD5 3573233cc8f1ce11f9217d2f9ff46565
BLAKE2b-256 290691be077a949ef9b409e1f6531cdcbd7c34ea751dd9ba74e4dcab42653a00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: iconipy-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for iconipy-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 16591905f3980a71f2f5480493cdec005f5cf44deaba55a14a8923c34ec96fe8
MD5 be3334a9bf1f1e5a9ed97d52b51c7674
BLAKE2b-256 9e73a486fe744424052ac42d1712b83149316bd9ab444d47d39c39e7e5de5c70

See more details on using hashes here.

Supported by

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