Pythonic Vue.js
Project description
RE:Newal!
- changed project style more silimar to vuejs 2.x template
- use vue file by vbuild
Install
using pip
pip install pyvuejs
Usage
start server by main.py file in project directory
python ./main.py
view/component editing guide
same as vue.js, can support by linting
- for now, template, style, script blocks are supported
- more information from vbuild
<!-- template block -->
<template>
<div>
<label>{{ count }}</label>
<div>
<button style="margin-right:10px;" v-on:click="up_count">up</button>
<button v-on:click="down_count">down</button>
</div>
</div>
</template>
<!-- style block -->
<style scoped>
button {
width: 80px;
}
</style>
<!-- script block -->
<script lang="python">
class Component:
def __init__(self):
self.count = 0
def up_count(self):
self.count += 1
def down_count(self):
if self.count > 0:
self.count -= 1
</script>
use view/component
just call name in other view
<template>
<div id="app">
<div id="nav">
<label v-on:click="show_home">Home</label> |
<label v-on:click="show_about">About</label> |
<label v-on:click="show_counter">Counter</label>
</div>
<Home v-if="page == 'Home'" />
<About v-else-if="page == 'About'" />
<Counter v-else-if="page == 'Counter'" />
<div v-else></div>
</div>
</template>
Todo
- routes
License
pyvuejs is MIT license
Release History
2.0.0
- renewal version1
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
pyvuejs-2.0.1.tar.gz
(75.5 kB
view details)
Built Distribution
pyvuejs-2.0.1-py3-none-any.whl
(77.0 kB
view details)
File details
Details for the file pyvuejs-2.0.1.tar.gz
.
File metadata
- Download URL: pyvuejs-2.0.1.tar.gz
- Upload date:
- Size: 75.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f772eeae89ccd520f4a98f1bdfea9de12068b4aa302861b774da9a6be5ecf2b4 |
|
MD5 | d0b0e98ae672c8328880d576b13165ba |
|
BLAKE2b-256 | 7d24b467f388ddadb6cb3d0038f740c1fd555ec15ecbe098460a44d252a79f47 |
File details
Details for the file pyvuejs-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: pyvuejs-2.0.1-py3-none-any.whl
- Upload date:
- Size: 77.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6db5c6d1c9ce89765722aecb356ba9ce2c030bc53f99212378d290cd789d0e17 |
|
MD5 | 9d6547773bb23e3bd9f62d37301af8c9 |
|
BLAKE2b-256 | 68429c9f8148c2d54f71b9d50ca6499aa724773d82c5c4b47b9e35082640ec88 |