Skip to main content

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):

  1. 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)
    
  2. Create app via vue create vue.app.

  3. Edit vue.app/src/main.ts (if typescript) with:

     declare var VueSpaBackend: any;
     Vue.use(VueSpaBackend);
    
  4. Edit vue.app/public/index.html with:

     <script src="<%= BASE_URL %>vuespa.js"></script>
    
  5. Run the Python script!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for vuespa, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size vuespa-0.2.3.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page