Pythonic Vue.js
Project description
pyvue
Pythonic Vue.js MPA ToolkitInstall
using pip
pip install pyvuejs
from git
git clone https://github.com/eseunghwan/pyvuejs.git
cd pyvuejs
python setup.py install
Usage
create project with cli
python -m pyvuejs init
[output]
//=========== pyvuejs project init ===========//
AppName:
move to project directory and start with cli
default host = 0.0.0.0, port = 8000
python -m pyvuejs start
[output]
//=========== start pyvuejs app ===========//
Running on http://0.0.0.0:8000 (CTRL + C to quit)
[2020-07-17 18:46:40,927] Running on 0.0.0.0:8000 over http (CTRL + C to quit)
start command line options
-
host only
python -m pyvuejs start 127.0.0.1
-
port only
python -m pyvuejs start 9000
-
both host and port
python -m pyvuejs start 127.0.0.1 9000
PVUE editing guide
pvue file is a single view file against with vue file
pvue needs 4 code blocks
template(required)
template block is shown part of pvue
code style is absolutely same as Vue.js
<template>
<div id="app1">
<!-- elements -->
</div>
</template>
model(required)
model block is server-side part of pvue
code style is python, it's sensitive to tabs
<model>
Model app1:
# variables
testVar = 10
# compute methods
def compute_testVar(self):
self.testVar -= 1
</model>
style(optional)
style block is style part of template block
<style>
div#app1 {
/* styles */
}
</style>
script(optional)
script block runs in page
custom events, attributes can be set in script block
<script>
/* scripts */
</script>
License
pyvuejs is MIT license
Credits
This package was created with Cookiecutter and the cs01/cookiecutter-pypackage
project template.
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-0.1.0.tar.gz
(142.3 kB
view hashes)
Built Distribution
pyvuejs-0.1.0-py3-none-any.whl
(141.1 kB
view hashes)