schedutron / Flask Common
Licence: apache-2.0
A Flask extension with lots of common time-savers (file-serving, favicons, etc).
Stars: ✭ 227
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Flask Common
Preact Devtools
Browser extension for inspection Preact applications
Stars: ✭ 204 (-10.13%)
Mutual labels: extension
Sketchup Stl
A SketchUp Ruby Extension that adds STL (STereoLithography) file format import and export.
Stars: ✭ 214 (-5.73%)
Mutual labels: extension
Ssis Dashboard
HTML5 SQL Server Integration Services Dashboard
Stars: ✭ 206 (-9.25%)
Mutual labels: flask
Authlib
The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
Stars: ✭ 2,854 (+1157.27%)
Mutual labels: flask
Code D
Fully featured D language extension for Visual Studio Code using Serve-D
Stars: ✭ 202 (-11.01%)
Mutual labels: extension
Slapdash
Boilerplate for bootstrapping scalable multi-page Dash applications
Stars: ✭ 225 (-0.88%)
Mutual labels: flask
Uwsgi Nginx Flask Docker
Docker image with uWSGI and Nginx for Flask applications in Python running in a single container. Optionally with Alpine Linux.
Stars: ✭ 2,607 (+1048.46%)
Mutual labels: flask
Scout
RESTful search server written in Python, powered by SQLite.
Stars: ✭ 213 (-6.17%)
Mutual labels: flask
Saas Base
SaaS base application (Flask, Vue, Bootstrap, Webpack)
Stars: ✭ 208 (-8.37%)
Mutual labels: flask
Facebook Political Ads
Monitoring Facebook Political Ads
Stars: ✭ 215 (-5.29%)
Mutual labels: extension
Proxypool
An Efficient ProxyPool with Getter, Tester and Server
Stars: ✭ 3,050 (+1243.61%)
Mutual labels: flask
Titan
Create Discord server widgets for websites of all sizes! A simple to setup process for end-users. Server members may view or send messages into an embedded Discord channel.
Stars: ✭ 221 (-2.64%)
Mutual labels: flask
Marshmallow Jsonapi
JSON API 1.0 (https://jsonapi.org/) formatting with marshmallow
Stars: ✭ 203 (-10.57%)
Mutual labels: flask
Xmark
A PHP7 extension that can hook most functions/classes and parts of opcodes
Stars: ✭ 209 (-7.93%)
Mutual labels: extension
Eve Sqlalchemy
SQLAlchemy data layer for Eve-powered RESTful APIs
Stars: ✭ 215 (-5.29%)
Mutual labels: flask
Flask Jsonrpc
A basic JSON-RPC implementation for your Flask-powered sites
Stars: ✭ 223 (-1.76%)
Mutual labels: flask
flask-common
A Flask extension with lots of common time-savers (file-serving, favicons, etc).
An example app:
import time
from flask import Flask
from flask_common import Common
app = Flask(__name__)
app.debug = True
common = Common(app)
@app.route("/")
@common.cache.cached(timeout=50)
def hello():
time.sleep(1)
return "Hello World!"
if __name__ == "__main__":
common.serve()
Next:
- Put a
favicon.ico
in yourstatic
folder. - Enjoy!
Nicities
HTTP Headers:
-
X-Powered-By: Flask
. -
X-Processed-Time: 0.000133037567139
.
Other nice things:
-
@common.cache.cached(timeout=50)
decorator for caching views in memory. - Favicon support (
/favicon.ico
redirects to/static/favicon.ico
).
Web Server: Gunicorn + Meinheld
Automatically uses Gunicorn + Meinheld for production (when Flask.debug = False
), Flask's dev server for development.
Configuration environment variables:
-
WEB_CONCURRENCY
for specifying the number of synchronous gunicorn workers. -
PORT
for binding to a specific port.
File Server: WhiteNoise
Flask-Common automatically configures WhiteNoise to serve your static files.
Configurations
app.config['COMMON_FILESERVER_DISABLED'] = 1
app.config['COMMON_POWERED_BY_DISABLED'] = 1
app.config['COMMON_PROCESSED_TIME_DISABLED'] = 1
Cache configures
By default simple is a default cache type. But can you change this options, following below steps. Flask-Caching
app.config['COMMON_CACHE_TYPE'] = "simple"
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].