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.

Source Distribution

vuespa-0.2.2.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file vuespa-0.2.2.tar.gz.

File metadata

  • Download URL: vuespa-0.2.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for vuespa-0.2.2.tar.gz
Algorithm Hash digest
SHA256 858c8df311cc8b361a7a8459bc011cb9ccb8996336c0b1d404300b327cd96aca
MD5 46782d1d29b438861e72dbeef909f914
BLAKE2b-256 5566977afe89f266754ad87d7402f90f905f84bb0d05c480cab4a2f51a8dc153

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page