Adds Coffescript support to Flask applications
Project description
Flask-Espresso
==============
Adds Coffeescript [0] support to Flask [1] applications.
Flask-Espresso will compile on the fly your coffee-scripts in the template
directory of your application. To avoid performance issues, a cache mechanism
retrieves the scripts already compiled.
Install it
----------
$ pip install Flask-Espresso
Note : Flask-Espresso requires you to have a javascript runtime installed on
your system.
How-to use it
-------------
A simple example to show you how to use it. Create a new Flask application and
put a coffeescript file ``script.coffee`` in its template directory.
from flask import Flask
from flask.ext.espresso import Espresso, espresso
app = Flask(__name__)
esp = Espresso(app)
@app.route("/")
def hello():
return espresso('script.coffee')
if __name__ == "__main__":
app.run(debug=True)
Links
-----
[0] http://www.coffeescript.org
[1] http://flask.pocoo.org/
==============
Adds Coffeescript [0] support to Flask [1] applications.
Flask-Espresso will compile on the fly your coffee-scripts in the template
directory of your application. To avoid performance issues, a cache mechanism
retrieves the scripts already compiled.
Install it
----------
$ pip install Flask-Espresso
Note : Flask-Espresso requires you to have a javascript runtime installed on
your system.
How-to use it
-------------
A simple example to show you how to use it. Create a new Flask application and
put a coffeescript file ``script.coffee`` in its template directory.
from flask import Flask
from flask.ext.espresso import Espresso, espresso
app = Flask(__name__)
esp = Espresso(app)
@app.route("/")
def hello():
return espresso('script.coffee')
if __name__ == "__main__":
app.run(debug=True)
Links
-----
[0] http://www.coffeescript.org
[1] http://flask.pocoo.org/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-Espresso-0.2.0.tar.gz
(54.8 kB
view details)
File details
Details for the file Flask-Espresso-0.2.0.tar.gz
.
File metadata
- Download URL: Flask-Espresso-0.2.0.tar.gz
- Upload date:
- Size: 54.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb6ff95ae9a6115cb0992b1113ef66e364fbb1a2b3de289e3d09cefa69b76ae8 |
|
MD5 | 2dc1c3ad8155f07f9c41d5f826af53d5 |
|
BLAKE2b-256 | ca360f530d219d8ca9e2a05a86e6db3f7bc618f6142c1c72a1b7e764c2ff0843 |