app_version


Nameapp_version JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/lambdalisue/app_version
SummaryA tiny utility to get application version from pkg_resouces
upload_time2017-07-14 11:25:16
maintainer
docs_urlNone
authorAlisue
requires_python
licenseMIT
keywords application version
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            app_version
==========================
.. image:: https://img.shields.io/travis/lambdalisue/app_version/master.svg?style=flat-square
    :target: http://travis-ci.org/lambdalisue/app_version
    :alt: Build status
.. image:: https://img.shields.io/coveralls/lambdalisue/app_version/master.svg?style=flat-square
    :target: https://coveralls.io/github/lambdalisue/app_version?branch=master 
    :alt: Coverage
.. image:: https://img.shields.io/requires/github/lambdalisue/app_version/master.svg?style=flat-square
    :target: https://requires.io/github/lambdalisue/app_version/requirements/?branch=master
    :alt: Requirements Status
.. image:: https://img.shields.io/pypi/v/app_version.svg?style=flat-square
    :target: https://github.com/lambdalisue/app_version/blob/master/setup.py
    :alt: Version
.. image:: https://img.shields.io/pypi/l/app_version.svg?style=flat-square
    :target: https://github.com/lambdalisue/app_version/blob/master/LICENSE
    :alt: License
.. image:: https://img.shields.io/pypi/format/app_version.svg?style=flat-square
    :target: https://pypi.python.org/pypi/app_version/
    :alt: Format
.. image:: https://img.shields.io/pypi/pyversions/app_version.svg?style=flat-square
    :target: https://pypi.python.org/pypi/app_version/
    :alt: Supported python versions
.. image:: https://img.shields.io/pypi/status/app_version.svg?style=flat-square
    :target: https://pypi.python.org/pypi/app_version/
    :alt: Status

Do you write the version information on ``setup.py`` and ``__init__.py``?

This tiny application allow you to access version information of ``setup.py`` from ``__init__.py``.

Based on `this post <http://stackoverflow.com/questions/17583443/what-is-the-correct-way-to-share-package-version-with-setup-py-and-the-package/17638236#17638236>`_, I wrote this tiny application for convinience.

Check `online documentation <http://python-app_version.readthedocs.org/en/latest/>`_ for more details.

Installation
------------
Use pip_ like::

    $ pip install app_version

.. _pip: https://pypi.python.org/pypi/pip

Usage
-----
The following code is an example ``__init__.py``.

.. code-block:: python

    from app_version import get_versions
    __version__, VERSION = get_versions('your app name')
    
Then you can access the version string with ``__version__`` and version tuple with ``VERSION``.
The version tuple is useful for comparing versions like

.. code-block:: python

    >>> VERSION = (0, 1, 2)
    >>> VERSION > (0, 1, 0)
    True
    >>> VERSION > (0, 1, 1)
    True
    >>> VERSION > (0, 1, 2)
    False
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lambdalisue/app_version",
    "name": "app_version",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "application,version",
    "author": "Alisue",
    "author_email": "lambdalisue@hashnote.net",
    "download_url": "https://files.pythonhosted.org/packages/7d/07/1089c21119a1ea49326779d9e89dc57845a785f91cd52561f3492def4049/app_version-1.0.1.tar.gz",
    "platform": "",
    "description": "app_version\n==========================\n.. image:: https://img.shields.io/travis/lambdalisue/app_version/master.svg?style=flat-square\n    :target: http://travis-ci.org/lambdalisue/app_version\n    :alt: Build status\n.. image:: https://img.shields.io/coveralls/lambdalisue/app_version/master.svg?style=flat-square\n    :target: https://coveralls.io/github/lambdalisue/app_version?branch=master \n    :alt: Coverage\n.. image:: https://img.shields.io/requires/github/lambdalisue/app_version/master.svg?style=flat-square\n    :target: https://requires.io/github/lambdalisue/app_version/requirements/?branch=master\n    :alt: Requirements Status\n.. image:: https://img.shields.io/pypi/v/app_version.svg?style=flat-square\n    :target: https://github.com/lambdalisue/app_version/blob/master/setup.py\n    :alt: Version\n.. image:: https://img.shields.io/pypi/l/app_version.svg?style=flat-square\n    :target: https://github.com/lambdalisue/app_version/blob/master/LICENSE\n    :alt: License\n.. image:: https://img.shields.io/pypi/format/app_version.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/app_version/\n    :alt: Format\n.. image:: https://img.shields.io/pypi/pyversions/app_version.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/app_version/\n    :alt: Supported python versions\n.. image:: https://img.shields.io/pypi/status/app_version.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/app_version/\n    :alt: Status\n\nDo you write the version information on ``setup.py`` and ``__init__.py``?\n\nThis tiny application allow you to access version information of ``setup.py`` from ``__init__.py``.\n\nBased on `this post <http://stackoverflow.com/questions/17583443/what-is-the-correct-way-to-share-package-version-with-setup-py-and-the-package/17638236#17638236>`_, I wrote this tiny application for convinience.\n\nCheck `online documentation <http://python-app_version.readthedocs.org/en/latest/>`_ for more details.\n\nInstallation\n------------\nUse pip_ like::\n\n    $ pip install app_version\n\n.. _pip: https://pypi.python.org/pypi/pip\n\nUsage\n-----\nThe following code is an example ``__init__.py``.\n\n.. code-block:: python\n\n    from app_version import get_versions\n    __version__, VERSION = get_versions('your app name')\n    \nThen you can access the version string with ``__version__`` and version tuple with ``VERSION``.\nThe version tuple is useful for comparing versions like\n\n.. code-block:: python\n\n    >>> VERSION = (0, 1, 2)\n    >>> VERSION > (0, 1, 0)\n    True\n    >>> VERSION > (0, 1, 1)\n    True\n    >>> VERSION > (0, 1, 2)\n    False",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tiny utility to get application version from pkg_resouces",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/lambdalisue/app_version"
    },
    "split_keywords": [
        "application",
        "version"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ad25a53395b015c9eedee3f228397b25deae3037164ff2ead9b16da8a824783a",
                "md5": "8564310692a67b505dcaa2fd0cbf1c84",
                "sha256": "aeecceebf20f0935dadeb4aa246a962c5d99b6ccba623b433d0c3952d0964a22"
            },
            "downloads": -1,
            "filename": "app_version-1.0.1-py2-none-any.whl",
            "has_sig": false,
            "md5_digest": "8564310692a67b505dcaa2fd0cbf1c84",
            "packagetype": "bdist_wheel",
            "python_version": "py2",
            "requires_python": null,
            "size": 7886,
            "upload_time": "2017-07-14T11:25:59",
            "upload_time_iso_8601": "2017-07-14T11:25:59.629114Z",
            "url": "https://files.pythonhosted.org/packages/ad/25/a53395b015c9eedee3f228397b25deae3037164ff2ead9b16da8a824783a/app_version-1.0.1-py2-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a7035eeff1025f889d8d85738078c4f48e806aafe27c93ed1a52f3fbec029b06",
                "md5": "29bef19f97e219f3a91eee806d44e4a8",
                "sha256": "c38bd6931565b9a972961ef19f1ab8aa80748d68c0153000116800b7ce5678a8"
            },
            "downloads": -1,
            "filename": "app_version-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "29bef19f97e219f3a91eee806d44e4a8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7887,
            "upload_time": "2017-07-14T11:25:25",
            "upload_time_iso_8601": "2017-07-14T11:25:25.959382Z",
            "url": "https://files.pythonhosted.org/packages/a7/03/5eeff1025f889d8d85738078c4f48e806aafe27c93ed1a52f3fbec029b06/app_version-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7d071089c21119a1ea49326779d9e89dc57845a785f91cd52561f3492def4049",
                "md5": "c134eb469b90f22f9502e98b8ba0e724",
                "sha256": "c21f6ea7e97092ba9a28dd6f884766647888273cbda8bde8f108f9657d5b4bff"
            },
            "downloads": -1,
            "filename": "app_version-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c134eb469b90f22f9502e98b8ba0e724",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11155,
            "upload_time": "2017-07-14T11:25:16",
            "upload_time_iso_8601": "2017-07-14T11:25:16.398818Z",
            "url": "https://files.pythonhosted.org/packages/7d/07/1089c21119a1ea49326779d9e89dc57845a785f91cd52561f3492def4049/app_version-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2017-07-14 11:25:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lambdalisue",
    "github_project": "app_version",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "app_version"
}
        
Elapsed time: 0.11307s