pyconify is a Python wrapper for the universal Iconify API, providing access to over 100 icon sets and more than 100,000 icons from popular collections like FontAwesome and Material Design Icons. It allows fetching icon data, SVGs, and CSS, and includes caching for faster retrieval. The library is actively maintained, with its current version being 0.2.1, and receives irregular but ongoing updates.
pip install pyconifyVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import `pyconify`, search for icons, retrieve SVG data for a specific icon, and get the local file path for a cached SVG. It also highlights the caching mechanism and how to configure or clear it.
Be aware that initial icon fetches require network access. To pre-cache icons for offline deployment, explicitly call `pyconify.svg()` for all desired icons during application build or setup. To manage caching, set the `PYCONIFY_CACHE` environment variable to a custom path or to `0` or `false` to disable caching entirely.
For applications bundled with PyInstaller or similar tools, it is recommended to pre-fetch all required icons using `pyconify.svg()` and ensure they are included as data files in the application bundle. This is an active area of development, as noted in GitHub issues.
Add `import pyconify` at the beginning of your script or function where `pyconify` is used.
Verify the icon name and collection prefix (e.g., `fa-brands:python`). Use `pyconify.search()` to find available icons or consult the Iconify website (`https://icon-sets.iconify.design`) to confirm valid icon IDs.
Check your internet connection and proxy settings. Ensure no firewall is blocking access to `https://api.iconify.design`. If the problem persists, the Iconify API might be experiencing downtime, or your environment might have stricter network policies. Consider pre-caching icons if network reliability is a concern.