How to Get the Version of Your poetry-based Package from Python Code

How to Get the Version of Your poetry-based Package from Python Code
import pkg_resources

# replace package name with correct name
version = pkg_resources.get_distribution('package-name').version