Nyvalis is a lightweight and secure library for building desktop applications with Python using WebView2, inspired by Tauri. This document will guide you through setting up, using, and registering commands in Nyvalis.
Make sure you have Python installed on your machine. Then, install Nyvalis:
pip install nyvalisTo create a new Nyvalis project, use the command:
nyvalis new project_nameThis will generate a new project structure with all the necessary files.
To run your project in development mode, use:
nyvalis runThis will start the backend server and open the application in a WebView window.
To create a final version of your application, use:
nyvalis buildThis will generate the executable of your application, ready for distribution.
You can register commands as python functions file of your project. An example of a command would be:
@nyvalis.command
def example(name: str):
return f"{name}, Hello from Python!"Once registered, the frontend will be able to call it like this:
async function example() {
message = await invoke("example", { name });
}This is a personal project inspired by Tauri.