Skip to main content

iconify for python. Universal icon framework

Project description

pyconify

License PyPI Python Version CI codecov

Python wrapper for the Iconify API.

Iconify is a versatile icon framework that includes 100+ icon sets with more than 100,000 icons from FontAwesome, Material Design Icons, DashIcons, Feather Icons, EmojiOne, Noto Emoji and many other open source icon sets.

Search for icons at: https://icon-sets.iconify.design

Installation

pip install pyconify

Usage

import pyconify

# Info on available collections
collections = pyconify.collections()

# Info on specific collection(s)
details = pyconify.collection("fa", "fa-brands")

# Search for icons
hits = pyconify.search("python")

# Get icon data
data = pyconify.icon_data("fa-brands", "python")

# Get SVG
svg = pyconify.svg("fa-brands", "python")

# Get path to SVG temporary file for the session
file_name = pyconify.temp_svg("fa-brands", "python")

# Get CSS
css = pyconify.css("fa-brands", "python")

# Keywords
pyconify.keywords('home')

# API version
pyconify.iconify_version()

See details for each of these results in the Iconify API documentation.

cache

While the first fetch of any given SVG will require internet access, pyconfiy caches svgs for faster retrieval and offline use. To see or clear cache directory:

import pyconify

pyconify.get_cache_directory()  # reveal location of cache
pyconify.clear_cache()  # remove the cache directory

If you'd like to precache a number of svgs, the current recommendation is to use the svg() function:

import pyconify

import pyconify

ICONS_TO_STORE = {"mdi:bell", "mdi:bell-off", "mdi:bell-outline"}
for key in ICONS_TO_STORE:
    pyconify.svg(key)

Later calls to svg() will use the cached values.

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

pyconify-0.1.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

pyconify-0.1.1-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file pyconify-0.1.1.tar.gz.

File metadata

  • Download URL: pyconify-0.1.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyconify-0.1.1.tar.gz
Algorithm Hash digest
SHA256 31b77f0480402a07b69a4c686408afe7ad7907495162fadc531ba0aeee916336
MD5 e19aec6dc6b682509f30a51d7edea84b
BLAKE2b-256 bee2c63e0612a721e5d0c94aa754bfa7c39365e50e6f32182d1f5014ef8b5c58

See more details on using hashes here.

File details

Details for the file pyconify-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyconify-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyconify-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b45f4dc83d8a11e3e99e13a2626548136465a5145d691101ff32b98d8085ea66
MD5 0981805232bbb58434a1d9ff1242bcd2
BLAKE2b-256 448812f67fdf663ba3fc2a719386381ffd091a72e52ec30961dfe32f0fe6993b

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