Closed rugfri closed 5 months ago
We use setuptools-scm
for versioning. So you can just use importlib.metadata to retrieve the version info.
This is an example (for python<3.8 you need to use the importlib_metadata backport):
from importlib.metadata import version, PackageNotFoundError
try:
__version__ = version("package-name")
except PackageNotFoundError:
# package is not installed
pass
(from https://setuptools-scm.readthedocs.io/en/latest/usage/#version-at-runtime)
thanks!
pyElli's, is there a way implemented to get the pyElli version? elli.version seems to be not implemented, and I would like to avoid using pip since I need to embed the call into a code.
Thanks!