
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Python wrapper for the Tabler Icons library - a set of 5237 free MIT-licensed high-quality SVG icons for you to use in your python projects
Pillow
, PyQt5
, PyQt6
, PySide2
, PySide6
, Tkinter
, etc.pip install pytablericons
Import TablerIcons
and call the static load()
method with the desired OutlineIcon
or FilledIcon
:
from pytablericons import TablerIcons, OutlineIcon, FilledIcon
icon_rotate = TablerIcons.load(OutlineIcon.ROTATE) # Outline icon
icon_check = TablerIcons.load(FilledIcon.CIRCLE_CHECK) # Filled icon
NOTE:
The icon names are the same as on the tabler-icons.io site, except every letter is uppercase and hyphens are replaced with underscores.
Examples:rotate
→ROTATE
,arrow-down-right
→ARROW_DOWN_RIGHT
Setting a custom size, color, and stroke width:
# Width and height 100px (default: 24)
icon_custom_size = TablerIcons.load(OutlineIcon.ROTATE, size=100)
# Color red (default: '#FFF')
icon_custom_color = TablerIcons.load(OutlineIcon.ROTATE, color='#ff0000')
# Stroke width 1.5 (default: 2.0)
icon_custom_stroke_width = TablerIcons.load(OutlineIcon.ROTATE, stroke_width=1.5)
# Combining everything
icon_custom = TablerIcons.load(OutlineIcon.ROTATE, size=100, color='#ff0000', stroke_width=1.5)
NOTE:
The color can either be a hex color or one of very limited color names.
Examples:'#ec3440'
,'#581790'
,'red'
,'green'
,'blue'
from pytablericons import TablerIcons, FilledIcon
icon = TablerIcons.load(FilledIcon.CIRCLE_CHECK) # Load icon
icon.show() # Show icon
print(icon.size) # Print icon size
from PyQt6.QtGui import QIcon
from PyQt6.QtWidgets import QMainWindow, QPushButton
from pytablericons import TablerIcons, OutlineIcon
class Window(QMainWindow):
def __init__(self):
super().__init__(parent=None)
# Load icon
icon_rotate = TablerIcons.load(OutlineIcon.ROTATE, color='#000')
# Create button with icon
self.button = QPushButton(self)
self.button.setText('Rotate')
self.button.setIcon(QIcon(icon_rotate.toqpixmap()))
from PIL import ImageTk
from tkinter import Tk, Button
from tkinter.constants import *
from pytablericons import TablerIcons, OutlineIcon
# Create window
root = Tk()
# Load icon and convert to ImageTk
icon_rotate = TablerIcons.load(OutlineIcon.ROTATE, size=16, color='#000', stroke_width=3.0)
icon_rotate_tk_image = ImageTk.PhotoImage(icon_rotate)
# Create button with icon
button = Button(root, text='Rotate', image=icon_rotate_tk_image, compound=LEFT)
button.pack(padx=50, pady=25)
# Run event loop
root.mainloop()
More in-depth examples can be found in the examples folder.
Installing the required test dependencies pytest and coveragepy:
pip install pytest coverage
To run the tests with coverage, clone this repository, go into the main directory and run:
coverage run -m pytest
coverage report --ignore-errors -m
This software is licensed under the MIT license.
FAQs
A Python wrapper for the Tabler Icons library with 5237 high-quality icons
We found that pytablericons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.