Registry / web-framework / flask-silk

flask-silk

JSON →
library0.2pypiunverified

Flask-Silk is a small, unmaintained Flask extension (version 0.2, last released March 2013) that provides an easy way to integrate FamFamFam Silk icons into Flask applications, blueprints, or other extensions. It handles serving these static icon files. Due to its age, it may have compatibility issues with modern Flask and Python versions.

pip install Flask-Silk
INSTALL
IMPORT
SIG · FLASK-SILK
F
flask-silk
web-frameworkenv0.2
Install
4.5s avg
Import
465ms
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.484s · 27.9MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 4.5s · import 0.446s · 28MB
26MB installed
● package 26MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Silk
from flask_silk import Silk
from flask.ext.silk import Silk
The `flask.ext` namespace was deprecated in Flask 0.8 and removed in Flask 1.0. Modern Flask applications should use direct imports from the extension's package name.
url_for('silkicon', filename='bug.png')
from flask import Flask, url_for # ... app setup ... # silk = Silk(app) # ... icon_url = url_for('silkicon', filename='bug.png')
The `silkicon` endpoint is registered by Flask-Silk to serve the icons.

This quickstart initializes a Flask application and integrates Flask-Silk. It then defines a route that uses `url_for('silkicon', filename='bug.png')` to generate a URL for a Silk icon, which is embedded in the HTML response.

from flask import Flask, url_for from flask_silk import Silk app = Flask(__name__) silk = Silk(app) # Initialize Flask-Silk with your Flask app @app.route('/') def index(): bug_icon_url = url_for('silkicon', filename='bug.png') return f'<h1>Hello, Flask-Silk!</h1><img src="{bug_icon_url}" alt="Bug Icon">' if __name__ == '__main__': app.run(debug=True)
Debug
Known issues
breakingThe `flask.ext` import mechanism, commonly used by older Flask extensions like Flask-Silk, was deprecated in Flask 0.8 and removed in Flask 1.0. Direct imports from the package name are now required, e.g., `from flask_silk import Silk`.
fix
Update import statements from `from flask.ext.silk import Silk` to `from flask_silk import Silk`.
affects: Flask 1.0 and later
breakingFlask-Silk is explicitly marked as 'not maintaining' by its author on GitHub and has not been updated since March 2013 (version 0.2). It is highly probable that it is incompatible with recent versions of Flask (e.g., Flask 2.x, 3.x) and Python (e.g., Python 3.8+).
fix
Consider alternatives for serving static icons or manually integrating the Silk icon set into your Flask application. If absolutely necessary to use, pin Flask and Python versions to very old compatible releases (e.g., Flask < 1.0, Python < 3.8).
affects: All Flask versions > 0.9, Python versions > 3.7
gotchaThe `url_for('silkicon', filename='...')` endpoint expects specific filenames for the Silk icons (e.g., 'bug.png'). Incorrect filenames will result in 404 Not Found errors for the icon.
fix
Ensure the `filename` argument passed to `url_for('silkicon', ...)` exactly matches an existing icon file provided by the Silk icon set.
affects: All versions
Errors
Common errors & fixes
ImportError: cannot import name 'silk' from 'flask.ext'
Attempting to import Flask-Silk using the deprecated `flask.ext` namespace, which was removed in Flask 1.0.
fix
Change the import statement to `from flask_silk import Silk`.
werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server.
This error can occur when `url_for('silkicon', filename='...')` is called, but Flask-Silk's blueprint or the `silkicon` endpoint is not properly registered or the requested filename does not exist.
fix
Ensure `silk = Silk(app)` (or `Silk(blueprint)`) is correctly called during application setup. Verify that the `filename` provided to `url_for` corresponds to an actual Silk icon file.
Upgrade
Version history
0.2latest on PyPI · released Mar 25, 2013
Audit
Dependencies
FlaskrequiredCore dependency for any Flask extension.
Agent activity
4 hits · last 30 days
node
4
Resources

No resource links recorded.

flask-silk — pip install flask-silk · libregistry