python_version


Namepython_version JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://gitlab.com/halfak/python_version
SummaryProvides a simple utility for checking the python version.
upload_time2017-12-01 17:28:30
maintainer
docs_urlNone
authorAaron Halfaker
requires_python
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## Python Version

This package provides a basic python version checking utility.  
It will check for a range of python versions and either report
an error or exit depending on the parameters provided.

## Example

```
$ python
Python 3.5.1+ (default, Mar 30 2016, 22:46:26)
[GCC 5.3.1 20160330] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import python_version
>>>
>>> try:
...     python_version.check(min=(3, 0, 0), max=(4, 0, 0))
... except Exception as e:
...     print(repr(e))
... else:
...     print("All good!")
...
All good!
>>> try:
...     python_version.check(min=(3, 6, 0), max=(4, 0, 0))
... except Exception as e:
...     print(repr(e))
... else:
...     print("All good!")
...
VersionConflict('requires python version >= 3.6.0 but the running python version is 3.5.1+',)
>>> try:
...     python_version.check(min=(2, 7, 0), max=(2, 7, 999))
... except Exception as e:
...     print(repr(e))
... else:
...     print("All good!")
...
VersionConflict('requires python version <= 2.7.999 but the running python version is 3.5.1+',)
>>> try:
...     python_version.check(min=(2, 7, 0), max=(2, 7, 999), exit_on_error=True)
... except Exception as e:
...     print(repr(e))
... else:
...     print("All good!")
...
requires python version <= 2.7.999 but the running python version is 3.5.1+
$
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/halfak/python_version",
    "name": "python_version",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Aaron Halfaker",
    "author_email": "aaron.halfaker@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/fe/74/8ed1d7f895b33a89565be4b1c8651d503fcb2cdda951fef4ec6f6906432c/python_version-0.0.2.tar.gz",
    "platform": "",
    "description": "## Python Version\n\nThis package provides a basic python version checking utility.  \nIt will check for a range of python versions and either report\nan error or exit depending on the parameters provided.\n\n## Example\n\n```\n$ python\nPython 3.5.1+ (default, Mar 30 2016, 22:46:26)\n[GCC 5.3.1 20160330] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import python_version\n>>>\n>>> try:\n...     python_version.check(min=(3, 0, 0), max=(4, 0, 0))\n... except Exception as e:\n...     print(repr(e))\n... else:\n...     print(\"All good!\")\n...\nAll good!\n>>> try:\n...     python_version.check(min=(3, 6, 0), max=(4, 0, 0))\n... except Exception as e:\n...     print(repr(e))\n... else:\n...     print(\"All good!\")\n...\nVersionConflict('requires python version >= 3.6.0 but the running python version is 3.5.1+',)\n>>> try:\n...     python_version.check(min=(2, 7, 0), max=(2, 7, 999))\n... except Exception as e:\n...     print(repr(e))\n... else:\n...     print(\"All good!\")\n...\nVersionConflict('requires python version <= 2.7.999 but the running python version is 3.5.1+',)\n>>> try:\n...     python_version.check(min=(2, 7, 0), max=(2, 7, 999), exit_on_error=True)\n... except Exception as e:\n...     print(repr(e))\n... else:\n...     print(\"All good!\")\n...\nrequires python version <= 2.7.999 but the running python version is 3.5.1+\n$\n```\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Provides a simple utility for checking the python version.",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://gitlab.com/halfak/python_version"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8e306841b7e2b5dab99f6e5ece60db926ce35b9cf351da87ecaf2d75e5d9009",
                "md5": "4814649585d3e39b5435e07be8a00599",
                "sha256": "2c7429f3375cee19873892e5db4d10d2b42172d8851a8bb5111729e028470580"
            },
            "downloads": -1,
            "filename": "python_version-0.0.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4814649585d3e39b5435e07be8a00599",
            "packagetype": "bdist_wheel",
            "python_version": "3.5",
            "requires_python": null,
            "size": 3411,
            "upload_time": "2017-12-01T17:28:32",
            "upload_time_iso_8601": "2017-12-01T17:28:32.686981Z",
            "url": "https://files.pythonhosted.org/packages/a8/e3/06841b7e2b5dab99f6e5ece60db926ce35b9cf351da87ecaf2d75e5d9009/python_version-0.0.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe748ed1d7f895b33a89565be4b1c8651d503fcb2cdda951fef4ec6f6906432c",
                "md5": "dfb13254eaa9f2adccc09f73d2cb5cf7",
                "sha256": "5c16de57c7f2d614621cf468e8f5a20bb6b3cec665c9c7f5e9f9f000bf04fe67"
            },
            "downloads": -1,
            "filename": "python_version-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "dfb13254eaa9f2adccc09f73d2cb5cf7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1888,
            "upload_time": "2017-12-01T17:28:30",
            "upload_time_iso_8601": "2017-12-01T17:28:30.993044Z",
            "url": "https://files.pythonhosted.org/packages/fe/74/8ed1d7f895b33a89565be4b1c8651d503fcb2cdda951fef4ec6f6906432c/python_version-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2017-12-01 17:28:30",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "halfak",
    "gitlab_project": "python_version",
    "lcname": "python_version"
}
        
Elapsed time: 2.99623s