Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ysenarath/flask-parcel
Flask-Parcel Extension
https://github.com/ysenarath/flask-parcel
Last synced: 2 days ago
JSON representation
Flask-Parcel Extension
- Host: GitHub
- URL: https://github.com/ysenarath/flask-parcel
- Owner: ysenarath
- License: mit
- Created: 2021-08-08T17:08:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-16T15:46:08.000Z (about 3 years ago)
- Last Synced: 2024-03-15T01:03:38.342Z (8 months ago)
- Language: Python
- Size: 171 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - ysenarath/flask-parcel - Flask-Parcel Extension (Python)
README
# flask-parcel
Parcel Extension for Flask. Automates the build process of your node assets and serve them as static files.
Additionally, you can use the build assets as Jinja2 templates and inject your values when serving.# Installing
1. Install [NodeJS](https://nodejs.org/)
2. Install Flask (https://pypi.org/project/Flask/)
3. Install Flask-Parcel using `pip install Flask-Parcel`# A Simple Example
```python
from flask import Flask
from flask_parcel import Parcelparcel = Parcel()
parcel.add_input(inputs=['index.html'])
parcel.build()
app = Flask(__name__)
parcel.init_app(app)
@app.route("/")
def hello():
return parcel.render_template('index.html')
``````shell
$ flask run
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
```