Skip to main content

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


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)

Uploaded Source

Built Distribution

poetry_version-0.2.0-py2.py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page