get_version |b-pypi| |b-conda| |b-travis| |b-cover| |b-black|
=============================================================
Automatically use the latest “vX.X.X” Git tag as version in your Python package.
It also supports getting the version from Python source distributions (``sdist``) or,
once your package is installed, via ``importlib.metadata``.
usage
-----
Add the following into ``yourpackage.py`` (or ``__init__.py``):
.. code-block:: python
from get_version import get_version
__version__ = get_version(__file__)
del get_version
contributing
------------
Use |black|_ to ensure proper code style. In order to not forget you can use |pre-commit|_.
.. |b-travis| image:: https://travis-ci.com/flying-sheep/get_version.svg?branch=master
:target: https://travis-ci.com/flying-sheep/get_version
.. |b-cover| image:: https://coveralls.io/repos/github/flying-sheep/get_version/badge.svg
:target: https://coveralls.io/github/flying-sheep/get_version
.. |b-pypi| image:: https://img.shields.io/pypi/v/get_version.svg
:target: https://pypi.org/project/get_version
.. |b-conda| image:: https://img.shields.io/conda/vn/conda-forge/get_version.svg
:target: https://anaconda.org/conda-forge/get_version
.. |b-black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
.. |black| replace:: ``black .``
.. _black: https://black.readthedocs.io/en/stable/
.. |pre-commit| replace:: ``pre-commit install``
.. _pre-commit: https://pre-commit.com/
Raw data
{
"_id": null,
"home_page": "https://github.com/flying-sheep/get_version",
"name": "get_version",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "Philipp Angerer",
"author_email": "phil.angerer@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/02/fd/b212504343cdd6a15d3cf00c02f8e1aaf2b3ce0223736a3b1d239b4367e6/get_version-3.5.4.tar.gz",
"platform": "",
"description": "get_version |b-pypi| |b-conda| |b-travis| |b-cover| |b-black|\n=============================================================\nAutomatically use the latest \u201cvX.X.X\u201d Git tag as version in your Python package.\n\nIt also supports getting the version from Python source distributions (``sdist``) or,\nonce your package is installed, via ``importlib.metadata``.\n\nusage\n-----\nAdd the following into ``yourpackage.py`` (or ``__init__.py``):\n\n.. code-block:: python\n\n from get_version import get_version\n __version__ = get_version(__file__)\n del get_version\n\ncontributing\n------------\nUse |black|_ to ensure proper code style. In order to not forget you can use |pre-commit|_.\n\n.. |b-travis| image:: https://travis-ci.com/flying-sheep/get_version.svg?branch=master\n :target: https://travis-ci.com/flying-sheep/get_version\n.. |b-cover| image:: https://coveralls.io/repos/github/flying-sheep/get_version/badge.svg\n :target: https://coveralls.io/github/flying-sheep/get_version\n.. |b-pypi| image:: https://img.shields.io/pypi/v/get_version.svg\n :target: https://pypi.org/project/get_version\n.. |b-conda| image:: https://img.shields.io/conda/vn/conda-forge/get_version.svg\n :target: https://anaconda.org/conda-forge/get_version\n.. |b-black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/ambv/black\n\n.. |black| replace:: ``black .``\n.. _black: https://black.readthedocs.io/en/stable/\n.. |pre-commit| replace:: ``pre-commit install``\n.. _pre-commit: https://pre-commit.com/\n",
"bugtrack_url": null,
"license": "",
"summary": "A version helper in the spirit of versioneer.",
"version": "3.5.4",
"project_urls": {
"Homepage": "https://github.com/flying-sheep/get_version"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f91a120c6885a7b31d6fbd29751543bd794eb6d6a854ab7f8293302a51f09998",
"md5": "f6eebc59f1d47e5533162e759d603a66",
"sha256": "d49d9d897116ffcc1fac7773dea00d9de44ca1905b83955f3309bcd281cf063a"
},
"downloads": -1,
"filename": "get_version-3.5.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f6eebc59f1d47e5533162e759d603a66",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 18330,
"upload_time": "2022-02-07T10:24:28",
"upload_time_iso_8601": "2022-02-07T10:24:28.727267Z",
"url": "https://files.pythonhosted.org/packages/f9/1a/120c6885a7b31d6fbd29751543bd794eb6d6a854ab7f8293302a51f09998/get_version-3.5.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "02fdb212504343cdd6a15d3cf00c02f8e1aaf2b3ce0223736a3b1d239b4367e6",
"md5": "164c51221bd5aa2281c59c68d48a05a4",
"sha256": "5901c846518d55d52c1f6f037f5d2433952b46bbf36e38c52f064ae836556343"
},
"downloads": -1,
"filename": "get_version-3.5.4.tar.gz",
"has_sig": false,
"md5_digest": "164c51221bd5aa2281c59c68d48a05a4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 19499,
"upload_time": "2022-02-07T10:24:30",
"upload_time_iso_8601": "2022-02-07T10:24:30.636796Z",
"url": "https://files.pythonhosted.org/packages/02/fd/b212504343cdd6a15d3cf00c02f8e1aaf2b3ce0223736a3b1d239b4367e6/get_version-3.5.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-02-07 10:24:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "flying-sheep",
"github_project": "get_version",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "get_version"
}