Skip to main content

Pythonic Vue.js

Project description

pyvue

Pythonic Vue.js MPA Toolkit



Install

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.

Cookiecutter

cs01/cookiecutter-pypackage

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

pyvuejs-0.1.0.tar.gz (142.3 kB view details)

Uploaded Source

Built Distribution

pyvuejs-0.1.0-py3-none-any.whl (141.1 kB view details)

Uploaded Python 3

File details

Details for the file pyvuejs-0.1.0.tar.gz.

File metadata

  • Download URL: pyvuejs-0.1.0.tar.gz
  • Upload date:
  • Size: 142.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7

File hashes

Hashes for pyvuejs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 127cb2dbf21d9917c243a4c607fcf3100c3ea5f6bf025931c8896b82a6197832
MD5 207198d07c929c0a7c99df765191cd2c
BLAKE2b-256 9972fe5e83c86948d5585a102998e27633c0ca3e2e566390ff6013fb5b207dc1

See more details on using hashes here.

File details

Details for the file pyvuejs-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyvuejs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 141.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.7

File hashes

Hashes for pyvuejs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c998700307dbac9d2b8ac86dd8c309f6a4bf5a758e61b64ea2b838578445ef7
MD5 d83815a6d13fc86aa7b962d3bf8b0134
BLAKE2b-256 490d3506318a0bb3d93758d6235471ebd4953eeb1110e2528233bf712f44d9e1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page