Pythonic Vue
Project description
vue.py
use Vue.js with pure Python
vue.py provides Python bindings for Vue.js. It uses brython to run Python in the browser.
Here is a simple example of an vue.py component
from browser import alert
from vue import VueComponent
class HelloVuePy(VueComponent):
greeting = "Hello vue.py"
def greet(self, event):
alert(self.greeting)
template = """
<button @click="greet">click me</button>
"""
HelloVuePy("#app")
Installation
$ pip install vuepy
Development Status
The goal is to provide a solution to write fully-featured Vue applications in pure Python.
To get an overview what currently is supported, have a look at the Documentation.
Have a look here to see whats planned!
See also the Limitations
Documentation
Documentation for the last release is available here.
Documentation fo the current master branch can be found here.
Examples can be found here. These are vue.py versions of the Vue.js examples
Performance
Initial loading times of vue.py
apps can be very long.
Especially when loading a lot of python files.
Still figuring out how to solve this.
Have not done any peformance tests, but havent noticed any issues with performance as soon as the app was fully loaded.
Development
Getting Started
Open in gitpod.io
Get the code
$ git clone https://github.com/stefanhoelzl/vue.py.git
$ cd vue.py
Optionally you can create a venv
$ python -m venv venv
$ source venv/bin/activate
Install required python packages, the chromedriver for selenium and brython
$ make env.up
Format the code
$ make format
Run tests
$ make tests # runs all tets
$ make tests.unit # runs unit tests
$ make tests.selenium # runs selenium tests
$ make tests.cli # runs cli tests
$ make tests TEST=cli/test_provider.py::TestRenderIndex::test_defaults # run explicit test
Run an example
$ make run APP=examples/tree_view # makes example available on port 5000
Clean up your working directory.
$ make env.clean
Reset your development environment (clean up, reinstall packages and redownload needed files)
$ make env.down
$ make env.up
Publish a new release
$ make release # bumps minor version number
$ make release MODE=major # bumps major version number
$ make release MODE=patch # bumps patch number
Contributing
see CONTRIBUTING
License
This project is licensed under the MIT License - see the LICENSE file for details
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vuepy-0.3.0.tar.gz
.
File metadata
- Download URL: vuepy-0.3.0.tar.gz
- Upload date:
- Size: 266.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3633650338a7f0e9dd8fcf56d021ad00383b37f8a9a82abeda2b7f615eaad307 |
|
MD5 | 2d53894a49970756bd68f30981481e17 |
|
BLAKE2b-256 | 4dc5d85c11a4969cb9290543f87c59ae7e79f037b0c8a5b1a233a8e1190ac2ca |
File details
Details for the file vuepy-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: vuepy-0.3.0-py3-none-any.whl
- Upload date:
- Size: 275.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d5561054bd9ce1611376187c273036e268b2a352e9c253a5f855d24a6709e0a |
|
MD5 | a2de0e7485727ee877e5e8c156ad752e |
|
BLAKE2b-256 | ecdc016571db97417925048274ba7fc197010d0cedee489ff2b6c8d9aed0c1cd |