蟒蛇
vuep的Python项目详细描述
vue.py
对纯python使用Vue.js
py为Vue.js提供python绑定。 它使用brython在浏览器中运行python。
下面是一个vue.py组件的简单示例
frombrowserimportalertfromvueimportVueComponentclassHelloVuePy(VueComponent):greeting="Hello vue.py"defgreet(self,event):alert(self.greeting)template=""" <button @click="greet">click me</button> """HelloVuePy("#app")
开发状态
目标是提供一个用纯python编写功能齐全的vue应用程序的解决方案。
要了解当前支持的内容,请查看Documentation。
看看here有什么计划!
另请参见Limitations
文档
有文档here。
可以找到示例here。 这些是Vue.js examples的vue.py版本
性能
vue.py
应用程序的初始加载时间可能非常长。
尤其是在加载大量python文件时。
还在想办法解决这个问题。
没有做任何性能测试,但没有注意到任何性能问题 一旦应用程序完全加载。
安装
$ pip install vuepy
开发
获取代码
$ git clone https://github.com/stefanhoelzl/vue.py.git
$ cd vue.py
安装所需的python包,selenium和brython的chromedriver
$ make env.up
启动服务器(测试所需)
$ make serve
运行测试
$ make tests # runs all tets $ make tests.unit # runs unit tests $ make test.selenium # runs selenium tests
清理你的工作目录。
$ make env.clean
重置开发环境 (清理、重新安装软件包并重新下载所需的文件)
$ make env.down
许可证
这个项目是在麻省理工学院的许可下授权的-请参见LICENSE文件以了解详细信息