diff --git a/src/lib.rs b/src/lib.rs index e583657..767c627 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,6 +90,8 @@ fn tantivy(_py: Python, m: &Bound) -> PyResult<()> { m.add_wrapped(wrap_pymodule!(query_parser_error))?; + m.add("__version__", tv::version_string())?; + Ok(()) } diff --git a/tantivy/tantivy.pyi b/tantivy/tantivy.pyi index 316075f..a2fae48 100644 --- a/tantivy/tantivy.pyi +++ b/tantivy/tantivy.pyi @@ -439,3 +439,6 @@ class SnippetGenerator: def set_max_num_chars(self, max_num_chars: int) -> None: pass + +__version__: str +