{ "info": { "author": "Craig Hurd-Rindy", "author_email": "gnuworldman@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Utilities" ], "description": "The verschemes package provides easy and customizable version identifier\nmanagement in Python. It supports defining custom version schemes in a\nsubclass of the `Version` class. Instances of `Version` and its subclasses are\nconcrete versions guaranteed to follow the rules of the class from which they\nwere instantiated.\n\nThe `source `_,\n`documentation `_,\nand `issues `_\nare hosted on `GitHub `_.\n\nThis is an open-source project by and for the community. Contributions,\nsuggestions, and questions are `welcome `_\n(Twitter: @bravegnuworld).\n\n.. image:: https://travis-ci.org/gnuworldman/verschemes.svg?branch=master\n :alt: Build Status\n :target: https://travis-ci.org/gnuworldman/verschemes\n\n.. image:: https://img.shields.io/coveralls/gnuworldman/verschemes.svg\n :alt: Coverage Status\n :target: https://coveralls.io/r/gnuworldman/verschemes?branch=master\n\nNOTE\n^^^^\n\nVersion 1.1 introduces a backwards-incompatible change: Version instances are\nnow immutable. See the `Release Notes\n`_ for details.\n\nOverview\n========\n\nConcept\n-------\n\nMost versioned components have their own method of identifying their versions.\nThis method is often termed \"versioning\" or called a \"version scheme\". The\nmethod is simply a set of rules that dictate what is a valid version identifier\nand is usually separated (often by delimiters, such as a dot) in a number of\nsegments to signify hierarchy among the versions. The hierarchy determines\nordering along with the values of the segments within the hierarchy.\n\nImplementation\n--------------\n\nIn the `verschemes` library, a version scheme is a set of rules pertaining to\nthe identification of versions for a given scope or purpose. Each version\ncontains a number of segments often separated by delimiters. Each segment is\nallowed to have multiple fields to identify portions of the segment, though\nmany segments have just one field.\n\nMany version schemes are just integers separated by dots. The base\n`Version `_\nclass works fine for generic version numbers that fit\nthis scheme, but the real power of this library is in defining version schemes\n(`Version` subclasses) with segments that specifically describe the scheme and\nautomatically implement validation and normalized rendering of a version\nidentifier or a sequence of version segment values. The\n`SEGMENT_DEFINITIONS `_\nattribute of a `Version` subclass can be used to define the specific parameters\nof the version scheme that is represented by that class.\n\nThe library also contains some implementations of specific version schemes\nincluding\n`Python `_,\n`PEP 440 `_,\n`PostgreSQL `_, and\n`X.org `_\nversioning. More are sure to be added, and submissions of version shemes for\npopular, public projects/systems are welcome. These implementations also serve\nas examples for those wishing to subclass `Version` for their own (or\nanother's) version scheme.\n\nExamples\n========\n\nImporting\n---------\n\n>>> from verschemes import Version\n>>> from verschemes.python import PythonVersion, PythonMinorVersion\n>>> from verschemes.pep440 import Pep440Version\n\nInstantiation from a string\n---------------------------\n\n>>> Version(\"3.1.4\")\nverschemes.Version(3, 1, 4)\n>>> Pep440Version(\"3.1.4\")\nverschemes.pep440.Pep440Version(None, 3, 1, 4, None, None, None, None, None, None)\n\nInstantiation from segment values\n---------------------------------\n\n>>> Version(3, 1, 4)\nverschemes.Version(3, 1, 4)\n>>> PythonVersion(3, 1, 4, [\"b\", 5])\nverschemes.python.PythonVersion(3, 1, 4, Segment(releaselevel='b', serial=5))\n>>> Pep440Version(None, 3, 1, 4)\nverschemes.pep440.Pep440Version(None, 3, 1, 4, None, None, None, None, None, None)\n\nInstantiation from named segment values\n---------------------------------------\n\n>>> PythonVersion(major=3, minor=1, micro=4)\nverschemes.python.PythonVersion(3, 1, 4, None)\n>>> Pep440Version(release1=3, release2=1, release3=4)\nverschemes.pep440.Pep440Version(None, 3, 1, 4, None, None, None, None, None, None)\n>>> Pep440Version(epoch=2, release1=3, release2=1, release3=4, post_release=7)\nverschemes.pep440.Pep440Version(2, 3, 1, 4, None, None, None, None, 7, None)\n\nRendering\n---------\n\n>>> version = Version(3, 1, 4)\n>>> str(version)\n'3.1.4'\n>>> version.render()\n'3.1.4'\n>>> version = Pep440Version(\"3.1.4b5\", epoch=2)\n>>> str(version)\n'2!3.1.4b5'\n>>> version.render(min_release_segments=4)\n'2!3.1.4.0b5'\n\nComparison\n----------\n\n>>> Version(\"3.1.4\") == Version(3, 1, 4)\nTrue\n>>> Version(\"3.1.10\") > Version(\"3.1.4\")\nTrue\n>>> PythonVersion(3, 1, 4, [\"b\", 5]).minor_version == PythonMinorVersion(3, 1)\nTrue\n\nNormalization\n-------------\n\n>>> str(Version(\"3.01.0004\"))\n'3.1.4'\n>>> str(Pep440Version(\"3.1.4-dev5\"))\n'3.1.4.dev5'\n>>> str(Pep440Version(\"3.1.4post6\"))\n'3.1.4.post6'\n>>> str(Pep440Version(\"3.1.4.RC7\"))\n'3.1.4c7'\n\n.. _properties_examples:\n\nProperties\n----------\n\n>>> version = PythonVersion(3, 1, 4, [\"b\", 5])\n>>> version.major\n3\n>>> version.minor\n1\n>>> version.micro\n4\n>>> version.suffix.releaselevel\n'b'\n>>> version.suffix.serial\n5\n>>> version.is_release\nTrue\n>>> version.is_nondevelopment\nFalse\n>>> Pep440Version(\"3.1.4\").is_release\nTrue\n>>> Pep440Version(\"3.1.4a2\").is_release\nFalse\n\nReplacement\n-----------\n\n>>> version = Version(3, 1, 4)\n>>> new_version = version.replace(_0=2)\n>>> str(new_version)\n'2.1.4'\n>>> version = PythonVersion(3, 1, 4)\n>>> new_version = version.replace(major=2)\n>>> str(new_version)\n'2.1.4'", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gnuworldman/verschemes", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "verschemes", "package_url": "https://pypi.org/project/verschemes/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/verschemes/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/gnuworldman/verschemes" }, "release_url": "https://pypi.org/project/verschemes/1.2.1/", "requires_dist": null, "requires_python": null, "summary": "Version identifier management", "version": "1.2.1" }, "last_serial": 1173824, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "61900e3222231b6d9e9699cfe013ef7d", "sha256": "ffa761b3d48606b688c292c1860e3c393cecc6ad11940d94247e99dc52ebe4eb" }, "downloads": -1, "filename": "verschemes-1.0.0.tar.gz", "has_sig": false, "md5_digest": "61900e3222231b6d9e9699cfe013ef7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9106, "upload_time": "2014-07-04T21:43:17", "url": "https://files.pythonhosted.org/packages/11/0d/010cc9a2ce64e2252949400d193c0d75c1517bae57c5e0a9d389be3af289/verschemes-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "31e9ae4a733f59f82b5dfe223a687fb2", "sha256": "4d0e4a37595ea5efcd52dd5e39cb67712cbfeeba025b287658955c6f7df84982" }, "downloads": -1, "filename": "verschemes-1.1.0.tar.gz", "has_sig": false, "md5_digest": "31e9ae4a733f59f82b5dfe223a687fb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18185, "upload_time": "2014-07-27T01:55:36", "url": "https://files.pythonhosted.org/packages/06/75/a1c4058a916e669d35b17ca1171283e79653e69b0e71160ac8dd2ba31339/verschemes-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "c01b7a4bc84c8e7388200b1777426964", "sha256": "815a0547dc2c2c2e0868d5d2a76a89c64d3fe9e4e70b3a2306723a2d8110b7ca" }, "downloads": -1, "filename": "verschemes-1.2.0.tar.gz", "has_sig": false, "md5_digest": "c01b7a4bc84c8e7388200b1777426964", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18863, "upload_time": "2014-07-29T23:04:56", "url": "https://files.pythonhosted.org/packages/42/ef/cff730f89741fdd35ac4031b3c6a9ecb8005af0b34c3235dab3ca7b54acd/verschemes-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "91e818809732e35d18ed30a2b48221ed", "sha256": "fdcb7897055af0fc809834afedc1f0705f98b6e2e0ec16e39f0929199d78252e" }, "downloads": -1, "filename": "verschemes-1.2.1.tar.gz", "has_sig": false, "md5_digest": "91e818809732e35d18ed30a2b48221ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18839, "upload_time": "2014-07-30T06:05:07", "url": "https://files.pythonhosted.org/packages/43/c0/e50c4c51a971eb550ab01a5a5cacf6c1c83eef12a7d85b595d6da80bf8d8/verschemes-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "91e818809732e35d18ed30a2b48221ed", "sha256": "fdcb7897055af0fc809834afedc1f0705f98b6e2e0ec16e39f0929199d78252e" }, "downloads": -1, "filename": "verschemes-1.2.1.tar.gz", "has_sig": false, "md5_digest": "91e818809732e35d18ed30a2b48221ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18839, "upload_time": "2014-07-30T06:05:07", "url": "https://files.pythonhosted.org/packages/43/c0/e50c4c51a971eb550ab01a5a5cacf6c1c83eef12a7d85b595d6da80bf8d8/verschemes-1.2.1.tar.gz" } ] }