Skip to content
This repository has been archived by the owner on Nov 21, 2021. It is now read-only.
/ poetry-version Public archive

Python library for extracting version from poetry pyproject.toml file

License

Notifications You must be signed in to change notification settings

rominf/poetry-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poetry-version (deprecated)

What to use instead

Now there is a better way to extract the version of the package.

Assuming your package is named mypackage:

import importlib.metadata

__version__ = importlib.metadata.version("mypackage")

This code should work as is if you are using Python >= 3.8.

For Python 3.6 and 3.7 you need to install a backport: https://pypi.org/project/importlib-metadata/

About

Python library for extracting version from poetry pyproject.toml file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages