Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rominf/poetry-version
Python library for extracting version from poetry pyproject.toml file
https://github.com/rominf/poetry-version
Last synced: about 2 months ago
JSON representation
Python library for extracting version from poetry pyproject.toml file
- Host: GitHub
- URL: https://github.com/rominf/poetry-version
- Owner: rominf
- License: apache-2.0
- Archived: true
- Created: 2018-10-26T07:19:59.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-11-21T07:47:46.000Z (about 3 years ago)
- Last Synced: 2024-07-15T00:45:48.385Z (5 months ago)
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 13
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pyproject - poetry-version - Python library for extracting version from poetry pyproject.toml file. (Other Tools)
README
# 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`:
```python
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/