Documentation
vue.py
provides bindings for Vue.js.
If you are not familiar with Vue.js read the Vue.js Guide
and then get back here to learn how to use Vue.js with pure Python.
Installation
Install vue.py
via pip
$ pip install vuepy
or with flask include to deploy apps
$ pip install vuepy[flask]
or from current master branch
$ pip install git+https://github.com/stefanhoelzl/vue.py@master
First Application
Create a folder for your app
$ mkdir app
$ cd app
and as last step create a app.py
where you create your Vue Component
from vue import *
class App(VueComponent):
template = "<div>Hello vue.py</div>"
App("#app")
deploy your app
$ vue-cli deploy flask
Now goto http://localhost:5000 and see your first vue.py app.
Demo App
Checkout the MQTT-Dashboard.
It’s a little test project to demonstrate some vue.py
features:
- uses the Browsers local storage to implement a vue-plugin in python
- uses a vue.js plugin
- uses some vue.js components
- uses a vuex store
How to use Vue.js concepts
- Instance and Components
- Data and Methods
- Computed Properties and Watchers
- Props
- Lifecycle Hooks
- Customize V-Model
- Filter
- Custom Directives
- Plugins and Mixins
- Extend
- Render Function
- Vuex
- Vue Router