Helper library for Python+Vue Single Page Applications
Project description
vuespa
A combined Python + Vue.js Single Page Application (SPA) framework.
Example usage (from vuespa/__init__.py
):
-
Write Python API:
class Client(vuespa.Client): async def vuespa_on_open(self): print("Client connected!")
async def api_shoe(self, arg1): return f'Got {arg1}'
vuespa.VueSpa.run('vue.app', Client)
-
Create app via
vue create vue.app
. -
Edit
vue.app/src/main.ts
(if typescript) with:declare var VueSpaBackend: any; Vue.use(VueSpaBackend);
-
Edit
<script src="<%= BASE_URL %>vuespa.js"></script>vue.app/public/index.html
with: -
Run the Python script!
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
vuespa-0.1.tar.gz
(4.2 kB
view hashes)