{ "info": { "author": "R\u00e9mi Emonet", "author_email": "remi-242-e2f8@heeere.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "\nVuejs-python brings the concepts of vuejs to Python.\nYou can write your model/data as a Python object and your HTML UI/view with the very convenient vuejs syntax.\nAs soon as part of your model changes, all dependent variables are updated and the HTML UI is automatically refreshed.\n\nThe goal is to use not only Python the language but Python the platform (with numpy, system APIs, and other \"native\" things).\n\n## Installation\n\n~~~\npip install vuejspython\n~~~\n\n## Tiny Example\n\nYou need to create two files: one Python model and an HTML UI.\nA good convention (to help tools) is to use the same name, with the `.py` and `.html` extensions, respectively.\n\n
\n
\n\n `# example.py`\n\n```python\n ...\n @model\n class App:\n radius = 5\n def computed_area(self):\n return pi * self.radius ** 2\n\n vuejspython.start(App())\n```\n\n
\n
\n\n `# example.html`\n\n```html\n
\n Fill the radius in the text field: .\n (or with
\n A disk with radius {{ radius }} has an area of {{ area }}.\n
\n \u00a0\n \n \n```\n\n
\n
\n\n## Running, option 1: only with Python\n\n~~~bash\npython3 example.py\n\n# or a tiny shell function helper\npvue() { (sleep .5;firefox ${1%.*}.html)& python3 ${1%.*}.py;}\npvue example.py\n~~~\n\nThis will give you an address to which you should append your HTML file name, here `example.html`.\nIn this example, you will visit \n(or visit the given address `http://localhost:4260` and click your file).\n\nNB: you need to stop the command with `Ctrl+C` if you want to run another example.\n\n\n## Running, option 2: with hot reload on file change\n\nHere we will start two processes, one for the HTML part (with live reload, and another only for the Python).\n\nTerminal 1, hosting the HTML files with hot reload:\n\n~~~bash\n# one-time install\npip install watchdog\nnpm install -g simple-hot-reload-server\n# in terminal 1 (hot html reload, for all files)\nhrs .\n~~~\n(this gives you the address to open, after appending your file name, e.g., )\n\nTerminal 2, running the python server\n\n~~~bash\n# in terminal 2 (start or restart python)\nNOSERVE=1 python3 example.py\n# OR, for live restart\nNOSERVE=1 watchmedo auto-restart --patterns=\"*.py\" python3 example.py\n~~~\nNB: `NOSERVE=1` tells vuejspython to not serve the HTML files (it is handled by `hrs` above)\n\nNB: when changing the .py, a manual browser refresh is still needed, see below for a more complete solution\n\n### Helper for complete live reload (live restart for python)\n\n~~~bash\npvue() { if test \"$1\" = open ; then shift ; (sleep 1 ; firefox \"http://localhost:8082/${1%.*}.html\") & fi; watchmedo auto-restart --patterns=\"*.py\" --ignore-patterns=\"*/.#*.py\" bash -- -c '(sleep .250 ; touch '\"${1%.*}\"'.html) & python3 '\"${1%.*}\"'.py' ; }\n# Then\npvue example\n# OR to also open firefox\npvue open example\n# OR some convenient variations\nNOSERVE=1 pvue open example\npvue open example.\npvue open example.py\npvue open example.html\n# it always runs the file with the .py extension\n~~~\n\n\n## Other, different projects\n\nIf you're interested only in using Python the language with Vue.js, you can try [brython](http://brython.info/) and the [brython vue demo](http://brython.info/gallery/test_vue.html)\n\nThere are projects that try to help integrating Vue.js with different Python web frameworks. The goal is different: Vuejs-python makes python and vue tightly integrated, in a common, reactive model.\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/twitwi/vuejs-python/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "vuejspython", "package_url": "https://pypi.org/project/vuejspython/", "platform": "", "project_url": "https://pypi.org/project/vuejspython/", "project_urls": { "Homepage": "https://github.com/twitwi/vuejs-python/" }, "release_url": "https://pypi.org/project/vuejspython/0.2.3/", "requires_dist": [ "aiohttp", "websockets" ], "requires_python": "", "summary": "Bridging vuejs and python (e.g., to leverage numpy)", "version": "0.2.3" }, "last_serial": 5730816, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "a4b3003d23422b64b9ef8e8585b74646", "sha256": "e365be2d1d4c936c01f971d35b83f66aeaf47a172d50cc377b1b602e971d619b" }, "downloads": -1, "filename": "vuejspython-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a4b3003d23422b64b9ef8e8585b74646", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 145113, "upload_time": "2019-08-05T23:06:54", "url": "https://files.pythonhosted.org/packages/1c/9c/262ddcd22a224c752c5eaffe05d3a9432ccb9f3576fe46bd6934c5be4a27/vuejspython-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c45d4cb91aa19b2f6024b306183c4848", "sha256": "49ca596f231fed6e1fe5124291bb751119b5568d3e993af423649409979eaea9" }, "downloads": -1, "filename": "vuejspython-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c45d4cb91aa19b2f6024b306183c4848", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 141975, "upload_time": "2019-08-05T23:06:57", "url": "https://files.pythonhosted.org/packages/3e/38/7edaacf801699154a85ab0c428e0fee36ae36382c512f2775a047aae8666/vuejspython-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "3f0d7a4e7f0fa5fddb3e1159ec58b3b4", "sha256": "ea611b46289d7d9a572d5538eb52fae815505828b0fced44f826cf2b240655f2" }, "downloads": -1, "filename": "vuejspython-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3f0d7a4e7f0fa5fddb3e1159ec58b3b4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 145137, "upload_time": "2019-08-05T23:17:48", "url": "https://files.pythonhosted.org/packages/ff/d9/801d1292e94ef29d481f9f5381d84bd5b2311ab4d6f83422f81eadf33c87/vuejspython-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "62643cb430020ba519a85f1b1149700d", "sha256": "f145df73820b5288bd222cf4331f7cba94954eae498eac68201352f62827bba7" }, "downloads": -1, "filename": "vuejspython-0.2.1.tar.gz", "has_sig": false, "md5_digest": "62643cb430020ba519a85f1b1149700d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 142034, "upload_time": "2019-08-05T23:17:50", "url": "https://files.pythonhosted.org/packages/0e/c0/3258afbc83bc21690c9fce855a530ec35eef6abfc495172430a6235d2a6a/vuejspython-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "71140d5eba7d9ce96261bb10d5d51aa8", "sha256": "785583f0aacebc933c07e9344896b5a377be2b019b7b2baa5ee0020b69bcc257" }, "downloads": -1, "filename": "vuejspython-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "71140d5eba7d9ce96261bb10d5d51aa8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 146063, "upload_time": "2019-08-06T07:15:21", "url": "https://files.pythonhosted.org/packages/a2/5f/f33d94c9e2e6ad86291dd5d286a4c9edcb4f16b37e6767b1167f2a3a5624/vuejspython-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "49e7e3aca295629ca0e1d6af98a72935", "sha256": "b39d2d9b42ea5b6a160a205902e5ef9191e978bc81f4fae86eb513567a0b8a35" }, "downloads": -1, "filename": "vuejspython-0.2.2.tar.gz", "has_sig": false, "md5_digest": "49e7e3aca295629ca0e1d6af98a72935", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 142889, "upload_time": "2019-08-06T07:15:24", "url": "https://files.pythonhosted.org/packages/2f/6a/482899736d287249a9901b442aad6c33205bb65d12262e5920a074a363ba/vuejspython-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "960187521894ccac607145b3fc6b9d50", "sha256": "d19e017817bc03b04f11a83ed38e571fda8b32c8e3129501e86424967330f010" }, "downloads": -1, "filename": "vuejspython-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "960187521894ccac607145b3fc6b9d50", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 146319, "upload_time": "2019-08-26T13:17:11", "url": "https://files.pythonhosted.org/packages/0f/47/baf6190bf4428315feb16fc3b60eb7c135162a34e6b505b3652f24dd304d/vuejspython-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f0f320f360f315c6b5dbc0ba7c2678f9", "sha256": "1ed3d979bce4542821708f1691547737e26f8bb5b0bcc92812bd670e11d72309" }, "downloads": -1, "filename": "vuejspython-0.2.3.tar.gz", "has_sig": false, "md5_digest": "f0f320f360f315c6b5dbc0ba7c2678f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 143183, "upload_time": "2019-08-26T13:17:14", "url": "https://files.pythonhosted.org/packages/ef/07/06f7e1967e147c73153a40ab42b2d83f72b4d63fb60e6772e4d090d1e768/vuejspython-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "960187521894ccac607145b3fc6b9d50", "sha256": "d19e017817bc03b04f11a83ed38e571fda8b32c8e3129501e86424967330f010" }, "downloads": -1, "filename": "vuejspython-0.2.3-py3-none-any.whl", "has_sig": false, "md5_digest": "960187521894ccac607145b3fc6b9d50", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 146319, "upload_time": "2019-08-26T13:17:11", "url": "https://files.pythonhosted.org/packages/0f/47/baf6190bf4428315feb16fc3b60eb7c135162a34e6b505b3652f24dd304d/vuejspython-0.2.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f0f320f360f315c6b5dbc0ba7c2678f9", "sha256": "1ed3d979bce4542821708f1691547737e26f8bb5b0bcc92812bd670e11d72309" }, "downloads": -1, "filename": "vuejspython-0.2.3.tar.gz", "has_sig": false, "md5_digest": "f0f320f360f315c6b5dbc0ba7c2678f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 143183, "upload_time": "2019-08-26T13:17:14", "url": "https://files.pythonhosted.org/packages/ef/07/06f7e1967e147c73153a40ab42b2d83f72b4d63fb60e6772e4d090d1e768/vuejspython-0.2.3.tar.gz" } ] }