pyramz
Original, duotone-ready SVG icons for Python: web templates, Jupyter, CLI and sprites.
Downloads & Community Adoption
Health & Engineering Analysis (5 Pillars)
1. Governance & Community200 / 200 ▾
2. PEP Metadata & Packaging200 / 200 ▾
3. Security & Supply Chain200 / 200 ▾
4. Documentation, SEO & Ecosystem155 / 200 ▾
5. Engineering, CI & Quality165 / 200 ▾
Official Documentation & Usage Guide — pyramz
Show full original documentation (English README) ▾
Pyramz
Original SVG icons for Python, in outline and duotone styles with round or sharp corners.
Pyramz returns clean, accessible SVG markup for web pages, templates, notebooks and files. It has no dependencies and supports Python 3.9+. Browse every icon in the gallery.
Installation
pip install pyramz
PNG export is optional: pip install "pyramz[png]".
Usage
import pyramz
pyramz.icon("home")
pyramz.icon("bell", size=32, stroke_width=1.5)
pyramz.icon("heart", style="duotone", accent="#e11d48")
pyramz.icon("folder", corners="sharp")
pyramz.icon("search", title="Search") # accessible label
pyramz.search("money") # find icons by name or tag
pyramz.set_defaults(stroke_width=2) # project-wide defaults
pyramz.icon() returns an Icon that behaves like a string of SVG markup. It renders directly in Jinja2 and Django templates (no |safe needed) and in Jupyter, and it can be saved with .save("home.svg"), .to_data_uri() or .to_png("home.png").
Options
| Option | Default | Description |
|---|---|---|
size |
24 |
Width and height: a number or a CSS length |
color |
"currentColor" |
Stroke colour |
stroke_width |
1.75 |
Stroke width in grid units |
style |
"outline" |
"outline" or "duotone" |
accent |
same as color |
Duotone tint colour |
accent_opacity |
0.22 |
Duotone tint opacity |
corners |
"round" |
"round" or "sharp" |
absolute_stroke |
False |
Keep the stroke the same width in pixels at any size |
title |
None |
Accessible label; leave it out for decorative icons |
class_ |
None |
Extra CSS classes |
Any other keyword becomes an SVG attribute, with underscores turned into dashes (data_testid="x" → data-testid="x").
More
pyramz.names(),pyramz.categories()andpyramz.info(name)list and describe icons.pyramz.icons.arrow_right()gives attribute access with tab completion.pyramz.sprite([...])builds an SVG sprite sheet for<use href="#pyramz-home"/>.pyramz.register(name, paths)adds your own icons.
Command line
pyramz list
pyramz search arrow
pyramz show heart --style duotone
pyramz export -o svg/ --size 32
pyramz gallery -o gallery.html
Contributing
Contributions are welcome. See CONTRIBUTING.md.
License
Licensed under the Apache License, Version 2.0.