Python library for extracting version from poetry pyproject.toml file (deprecated)
Project description
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/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
poetry-version-0.2.0.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for poetry_version-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82445fe406699d84d7b5011d153bf97f2da04f94006e091dbaf302489e01b5b0 |
|
MD5 | d37217222976bb02831056d39a247cd9 |
|
BLAKE2b-256 | 176247db245e391350100ce1459b588e015f8a8543030e193a5cc3b0cdcabab5 |