Skip to main content

flask_fontpicker

A Flask extension for Jquery-ui google font picker, it makes adding and customizing multiple font pickers simpler and less time consuming.

Install:

- With pip

  • pip install Flask-Fontpicker

- From the source:

  • git clone https://github.com/mrf345/flask_fontpicker.git
  • cd flask_fontpicker
  • python setup.py install

Setup:

- Inside Flask app:

from flask import Flask, render_template
from flask_bootstrap import Bootstrap
from flask_fontpicker import fontpicker

app = Flask(__name__)
Bootstrap(app)
fontpicker(app)

- Inside jinja template:

{% extends 'bootstrap/base.html' %}
{% block scripts %}
  {{ super() }}
  {{ fontpicker.loader() }} {# to load jQuery-ui #}
  {{ fontpicker.picker(ids=["#dp"]) }}
{% endblock %}
{% block content %}
  <form class="verticalform">
    <input type="text" id="dp" class="form-control" />
  </form>
{% endblock %}

Settings:

- Options:

The accepted arguments to be passed to the fontpicker.picker() function are as follow:

def picker(self, ids=["#fontpicker"], # list of identifiers will be passed to Jquery to select element
                  families='["Droid Sans", "Roboto", "Roboto Condensed", "Signika"]',
                  # list of the font families to be displayed
                  loadAll='true', # to load all the selected fonts
                  default='Roboto', # default font to load at first
                  urlCss='', # to load fonts with local css file
                  spaceChar='+'): # spacing character used in local css file

- Local source:

by default the extension will load Jquery-ui plugin from a remote CDN. Although you can configure that to be locally through passing a list of .js and .css files into the fontpicker module like such:

fontpicker(app=app, local=[
  'static/js/jquery-ui.js', 
  'static/css/jquery-ui.css', 
  'static/js/webfont.js',
  'static/css/webfont.select.css',
  'static/js/webfont.select.js'
  ])

The order in-which the items of list are passed is not of importance, it will be auto detected via file extension

Credit:

  • Fontpicker: jQuery-ui web google font picker extension.

Metadata

Release files for Flask-Fontpicker 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Flask-Fontpicker 0.3
File Size Uploaded Provenance Actions
flask_fontpicker-0.3.tar.gz 4.6 kB Without provenance Details for flask_fontpicker-0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Flask-Fontpicker 0.3
File Interpreter ABI Platform Actions
flask_fontpicker-0.3-py3-none-any.whl Python 3 none any Details for flask_fontpicker-0.3-py3-none-any.whl

Total release size: 9.4 kB

Release files / flask_fontpicker-0.3.tar.gz

Download URL flask_fontpicker-0.3.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4d52c0af97e5c2ef6e083494b59340122761b8a7881d5297d059453a7996bd9a
BLAKE2b-256 checksum
How to use checksums
39624dfd3ebff9e6b49fac6268b26f316774566a2a8aec3855a90c8db114c14a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / flask_fontpicker-0.3-py3-none-any.whl

Download URL flask_fontpicker-0.3-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a52921c912e1ca9fc16be37d7acd108ee8007935539ebef0597c0de641715446
BLAKE2b-256 checksum
How to use checksums
397e24bbcc8f0e4fc8f1e96c77426ce124f360052563e0ab7fccf86da5bb96ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for Flask-Fontpicker 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page