This repository has been archived on 2024-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
pt/members/libpt-py/src/core/mod.rs

12 lines
306 B
Rust
Raw Normal View History

2024-02-29 22:22:44 +01:00
use pyo3::prelude::*;
/// implement a python module in Rust
#[pymodule]
#[pyo3(name = "core")]
pub fn submodule(py: Python, m: &PyModule) -> PyResult<()> {
let submodule = PyModule::new(py, "submodule")?;
submodule.add("super_useful_constant", "important")?;
m.add_submodule(m)?;
Ok(())
}