Rizzler creates a parallel front-end dev-server using ViteJS for ASGI Frameworks
Project description
Rizzler
Installation
Install using pip
$ pip install rizzler
> ...
Usage
Integrate with lifespan
protocol.
from contextlib import asynccontextmanager
from fastapi import FastAPI
from rizzler import Rizzler
from typing import AsyncIterator, List, Tuple
@Rizzler.load_config
def rizzler_settings() -> List[Tuple[str, ...]]:
return [
("command", "pnpm"),
("framework", "vue")
]
@asynccontextmanager
async def lifespan(app: FastAPI) -> AsyncIterator[None, None]:
Rizzler.initiate()
yield
Rizzler.terminate()
app: FastAPI = FastAPI(lifespan=lifespan)
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
clearScreen: false,
plugins: [ vue() ],
build: {
target: "esnext",
outDir: "./dist",
emptyOutDir: true,
assetsDir: "",
manifest: true,
rollupOptions: {
input: "./assets/javascript/main.tsx"
},
},
root: ".",
})
Templating
To be determined.
Acknowledgements
License
This project is licensed under the terms of the MIT license.
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
rizzler-0.0.1.tar.gz
(3.9 kB
view hashes)