diff --git a/src/lib.rs b/src/lib.rs index da06930..017e58c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,15 +1,14 @@ use pyo3::prelude::*; use ulid::{Ulid}; -/// Formats the sum of two numbers as string. #[pyfunction] -fn test() -> PyResult { +#[pyo3(name="ulid")] +fn get_ulid() -> PyResult { Ok(Ulid::new().to_string()) } -/// A Python module implemented in Rust. #[pymodule] fn pkpy(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_function(wrap_pyfunction!(test, m)?)?; + m.add_function(wrap_pyfunction!(get_ulid, m)?)?; Ok(()) }