Coder Social home page Coder Social logo

stefanhoelzl / vue.py Goto Github PK

View Code? Open in Web Editor NEW
307.0 307.0 20.0 2.49 MB

Pythonic Vue.js

Home Page: https://stefanhoelzl.github.io/vue.py/

License: MIT License

Makefile 0.98% HTML 0.44% Python 98.59%
client-side framework frontend gui python reactive ui vue vuejs web

vue.py's Introduction

vue.py

Build Status PyPI License

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

Reset your development environment (clean up, reinstall packages and redownload needed files)

$ make env.down
$ make env.up

Publish a new release

$ release release-candidate

Contributing

see CONTRIBUTING

License

This project is licensed under the MIT License - see the LICENSE file for details

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.