lean-probe 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lean_probe/__init__.py ADDED
@@ -0,0 +1,25 @@
1
+ """LeanProbe public API."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+ from pathlib import Path
5
+
6
+ from .core import LeanIncrementalSegment, LeanProbe
7
+
8
+ __all__ = ["LeanIncrementalSegment", "LeanProbe"]
9
+
10
+
11
+ def _source_tree_version() -> str:
12
+ pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml"
13
+ try:
14
+ for line in pyproject.read_text(encoding="utf-8").splitlines():
15
+ if line.startswith("version = "):
16
+ return line.split("=", 1)[1].strip().strip('"')
17
+ except OSError:
18
+ pass
19
+ return "0+unknown"
20
+
21
+
22
+ try:
23
+ __version__ = version("lean-probe")
24
+ except PackageNotFoundError:
25
+ __version__ = _source_tree_version()