#python #inline #macro #embed

stable-inline-python

Stable Variant of inline-python

3 releases

0.1.2 Nov 17, 2023
0.1.1 Nov 16, 2023
0.1.0 Nov 16, 2023

#1889 in Rust patterns

Download history 2/week @ 2024-02-16 14/week @ 2024-02-23 8/week @ 2024-03-01 1/week @ 2024-03-08 3/week @ 2024-03-15 29/week @ 2024-03-22 30/week @ 2024-03-29 1/week @ 2024-04-05

60 downloads per month

BSD-2-Clause

6KB
68 lines

stable-inline-python

Stable Ver. of Inline Rust

QuickStart

use stable_inline_python::PyContext;


fn main() {
    let c = PyContext::new();

    c.run("x = 2"); //outputs 2
    let x = c.get::<String>("x");
    println!("{}",x.unwrap());

    c.run("del x");
    let x = c.get::<String>("x");
    println!("{}",x.unwrap()); //error!
}

Dependencies

~3–8.5MB
~65K SLoC