Webapp template that made with Nuxt and FastAPI backend. Out of box, battery included.
from fastapi import FastAPI
app = FastAPI()
@app.route('/hello')
def hello(name: str = 'World'):
return {'greet': f'Hello, {name}!'}
<template>
<div>{{ greet }}</div>
</template>
<script>
export default {
asyncData({$api, route: {fullPath}}) {
return $api(fullPath)
}
}
</script>
- Python 3.x (with virtualenv)