tauri-plugin-python 0.3.9

A tauri 2 plugin to use python code in the backend.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//  Tauri Python Plugin
//  © Copyright 2024, by Marco Mengelkoch
//  Licensed under MIT License, see License file for more details
//  git clone https://github.com/marcomq/tauri-plugin-python

use serde::de::DeserializeOwned;
use tauri::{plugin::PluginApi, AppHandle, Runtime};

/// Access to the python plugin APIs.
pub struct Python<R: Runtime>(AppHandle<R>);

pub fn init<R: Runtime, C: DeserializeOwned>(
    app: &AppHandle<R>,
    _api: PluginApi<R, C>,
) -> crate::Result<Python<R>> {
    Ok(Python(app.clone()))
}