Skip to main content

Connect Flask With VueJS Framework

Project description

Install

For install the package run:

$ pip install flask-vuejs

Using

Import the Vue class in bootstrap flask file, see:

from flask_vuejs import Vue

Register extension

Vue(app)

With Factory

vue = Vue()

def create_app():
    app = Flask(__name__)
    vue.init_app(app)

Configuration

You can set the component directory, by default it uses 'static/components' folder, but, it can be easily changed.

def create_app():
    app.config["FLASK_VUE_COMPONENT_DIRECTORY"] = "vuecomponent"

Remember, if you changed component directory, you'll should be rename this directory on 'static' folder application

[JInja Template]

You can see how its works here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flask-vuejs, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size flask_vuejs-0.1.0-py3-none-any.whl (206.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flask-vuejs-0.1.0.tar.gz (203.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page