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

1 min read
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

Read more articles like this in the future by buying me a coffee!

Buy me a coffeeBuy me a coffee