Write Nuxt.js Apps in Python
Last updated 3 years ago by pi0 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nuxtjs/python 
SYNC missed versions from official npm registry.


npm (scoped with tag) npm CircleCI Codecov Dependencies js-standard-style

Write Nuxt.js Apps in Python

???? Release Notes


  • Write Nuxt.js applications using Python!
  • Currently only supports custom Javascripthon but in the future other compilers will also be expected to work.


  • Add @nuxtjs/python dependency using yarn or npm to your project
  • Add @nuxtjs/python to modules section of nuxt.config.js
  modules: [
    // Simple usage
  • Install the Javascripthon Python transpiler (for now you'll need the development version e.g. pip install -r requirements.txt).

  • Note that Javascripthon requires that you have Python 3.5 (or better).

  • In Vue files, Mark your script tags like this: <script lang="py?compiler=pj">.

  • Please note syntax conversions.


Using .vue files

TIP If you use Vim you can get the full experience with https://github.com/posva/vim-vue/pull/97


      Nuxt {{ best_lang }}

<script lang="py?compiler=pj">
class Component:
  def __init__(self):
      self['data'] = lambda: { 'best_lang': 'Python' }

__default__ = Component()

Using .py files for other nuxt files


from vuex import Store

def increment(state):
    state.counter = state.counter + 1

def createStore():
    return Vuex.Store(
      state={'counter': 0},
      mutations={'increment': increment}

__default__ = createStore


  <h2>{{ $store.state.counter }}</h2>
  <button @click="$store.commit('increment')">+1</button>

???? For a working example, see here.


  • Clone this repository
  • Install dependencies using yarn install or npm install
  • Start development server using npm run dev


MIT License

Copyright (c) Sebastian Silva sebastian@fuentelibre.org

This module was started from the module-template by Pooya Parsa and relies heavily on python-webpack-loader by Martim Nascimento and Javascripthon by Alberto Berti.

Current Tags

  • 0.0.1                                ...           latest (3 years ago)

1 Versions

  • 0.0.1                                ...           3 years ago
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
  • py-loader github:martim00/python-webpack-loader
Dev Dependencies (13)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |