GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - pytauri/pytauri: Tauri binding for Python through Pyo3

BranchesTags
Open more actions menu

Latest commit

 

History

249 Commits
249 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
crates
crates
 
 
docs
docs
 
 
docs_src
docs_src
 
 
examples
examples
 
 
python
python
 
 
scripts
scripts
 
 
tests/pytauri-test
tests/pytauri-test
 
 
utils
utils
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
_typos.toml
_typos.toml
 
 
commitlint.config.ts
commitlint.config.ts
 
 
mkdocs.yml
mkdocs.yml
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
pyproject.toml
pyproject.toml
 
 
release.py
release.py
 
 
renovate.json
renovate.json
 
 
tsconfig.base.json
tsconfig.base.json
 
 
uv.lock
uv.lock
 
 

Repository files navigation

PyTauri

banner.png

Tauri bindings for Python through Pyo3


CI: docs msrv requires-python Discord

Documentation: https://pytauri.github.io/pytauri/

Source Code: https://github.com/pytauri/pytauri/


This is a completely free and open-source project, but it is difficult to maintain without incentives and contributions from the community.

If you think this project is helpful, consider giving it a star GitHub Repo stars, it would be very helpful for my work and studies. πŸ₯ΊπŸ‘‰πŸ‘ˆ


Features

TL;DR

You are hurry and just wanna see/run the demo? See examples/tauri-app.

  • Need Rust compiler, but almost don't need to write Rust code!

  • Or use pytauri-wheel, you won't need the Rust compiler, everything can be done in Python! Check out examples/tauri-app-wheel.

  • Can be integrated with tauri-cli to build and package standalone executables!

    • Use Cython to protect your source code!
  • No IPC (inter-process communication) overhead, secure and fast, thanks to Pyo3!

  • Support Tauri official plugins(e.g., notification), and you can write your own plugins!

    demo

  • Natively support async python (asyncio, trio or anyio)

  • 100% Type Completeness

  • Ergonomic API (and as close as possible to the Tauri Rust API)

    • Automatically generated TypeScript types and client for IPC

    • Python

      import sys
      
      from pydantic import BaseModel
      from pytauri import (
          AppHandle,
          Commands,
      )
      from pytauri_plugins.notification import NotificationExt
      
      commands: Commands = Commands()
      
      
      class Person(BaseModel):
          name: str
      
      
      class Greeting(BaseModel):
          message: str
      
      
      @commands.command()
      async def greet(body: Person, app_handle: AppHandle) -> Greeting:
          notification_builder = NotificationExt.builder(app_handle)
          notification_builder.show(title="Greeting", body=f"Hello, {body.name}!")
      
          return Greeting(
              message=f"Hello, {body.name}! You've been greeted from Python {sys.version}!"
          )
    • Frontend

      import { pyInvoke } from "tauri-plugin-pytauri-api";
      // or: `const { pyInvoke } = window.__TAURI__.pytauri;`
      
      export interface Person {
          name: string;
      }
      
      export interface Greeting {
          message: string;
      }
      
      export async function greet(body: Person): Promise<Greeting> {
          return await pyInvoke("greet", body);
      }
  • Can be integrated with nicegui/gradio/FastAPI to achieve a full-stack Python development experience (i.g., without Node.js). See examples/nicegui-app.

Release

We follow Semantic Versioning 2.0.0.

Rust and its Python bindings, PyTauri core and its plugins will keep the same MAJOR.MINOR version number.

name pypi crates.io npmjs
πŸ‘‰ core - - -
pytauri pytauri-pypi-v pytauri-crates-v
pytauri-core pytauri-core-crates-v
tauri-plugin-pytauri tauri-plugin-pytauri-crates-v tauri-plugin-pytauri-api-npm-v
πŸ‘‰ wheel - - -
pytauri-wheel pytauri-wheel-pypi-v
πŸ‘‰ utils - - -
pyo3-utils pyo3-utils-pypi-v pyo3-utils-crates-v
codelldb codelldb-pypi-v

Philosophy

For Pythoneer

I hope PyTauri can become an alternative to pywebview and Pystray, leveraging Tauri's comprehensive features to offer Python developers a GUI framework and a batteries-included development experience similar to electron and PySide.

PyTauri is inspired by FastAPI and Pydantic, aiming to offer a similar development experience.

For Rustacean

Through Pyo3, I hope Rust developers can better utilize the Python ecosystem (e.g., building AI GUI applications with PyTorch).

Although Rust's lifetime and ownership system makes Rust code safer, Python's garbage collection (GC) will make life easier. πŸ˜†

Used By

Although PyTauri is a fairly young project, a few people have used it to make cool projects:

  • Digger Solo - AI powered file manager

Credits

PyTauri is a project that aims to provide Python bindings for Tauri, a cross-platform webview GUI library. Tauri is a trademark of the Tauri Program within the Commons Conservancy and PyTauri is not officially endorsed or supported by them. PyTauri is an independent and community-driven effort that respects the original goals and values of Tauri. PyTauri does not claim any ownership or affiliation with the Tauri Program.

License

This project is licensed under the terms of the Apache License 2.0.

About

Tauri binding for Python through Pyo3

pytauri.github.io/pytauri/

Topics

bindingsdesktop-appguipythontauriwebview

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity
Custom properties

Stars

1.4k stars

Watchers

12 watching

Forks

30 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.