diff --git a/src/groundlight/__init__.py b/src/groundlight/__init__.py index 30a6d149..6005cbba 100644 --- a/src/groundlight/__init__.py +++ b/src/groundlight/__init__.py @@ -4,3 +4,13 @@ # Imports from our code from .client import Groundlight + +try: + import importlib.metadata + + # Copy the version number from where it's set in pyproject.toml + __version__ = importlib.metadata.version("groundlight") +except ModuleNotFoundError: + # importlib.metadata was only added in py3.8 + # We're still supporting py3.7 + __version__ = "(version number available in python 3.8+)"