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:

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 py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page