{ "info": { "author": "Adam Charnock", "author_email": "adam@adamcharnock.com", "bugtrack_url": null, "classifiers": [], "description": "smalluuid\n=========\n\n.. image:: https://img.shields.io/pypi/v/smalluuid.svg\n :target: https://pypi.python.org/pypi/smalluuid/\n\n.. image:: https://img.shields.io/pypi/dm/smalluuid.svg\n :target: https://pypi.python.org/pypi/smalluuid/\n\n.. image:: https://img.shields.io/github/license/adamcharnock/smalluuid.svg\n :target: https://pypi.python.org/pypi/smalluuid/\n\n.. image:: https://img.shields.io/travis/adamcharnock/smalluuid.svg\n :target: https://travis-ci.org/adamcharnock/smalluuid/\n\n.. image:: https://coveralls.io/repos/adamcharnock/smalluuid/badge.svg\n :target: https://coveralls.io/r/adamcharnock/smalluuid/\n\n\nInstallation\n------------\n\nInstallation using pip::\n\n pip install smalluuid\n\n**Do you use Django?** See django-smalluuid_.\n\nBasic Usage\n-----------\n\nA drop-in replacement for Python's UUID class which \u2013 by default \u2013 \nrepresents UUIDs as 22 character base64-encoded values. \n\n.. code-block:: python\n\n >>> from smalluuid import SmallUUID\n >>> uuid = SmallUUID()\n \n # Displays as short UUID by default\n >>> uuid\n SmallUUID('IBNApQOzTHGzdjkSt6t-Jg')\n >>> print(uuid)\n IBNApQOzTHGzdjkSt6t-Jg\n \n # Hex output still available\n >>> SmallUUID().hex\n '44a30f95b86f429f83c5669fed1998ab'\n >>> uuid.hex_grouped\n '201340a5-03b3-4c71-b376-3912b7ab7e26'\n \n # Will initialise from short UUID\n >>> SmallUUID('IBNApQOzTHGzdjkSt6t-Jg')\n SmallUUID('IBNApQOzTHGzdjkSt6t-Jg')\n \n # Will load as a hex value\n >>> SmallUUID(hex='201340a5-03b3-4c71-b376-3912b7ab7e26')\n SmallUUID('RKMPlbhvQp-DxWaf7RmYqw')\n\nNotable differences from Python's UUID implementation:\n\n* Short-form UUIDs accepted as first parameter to ``__init__``\n* Instantiating without a value will assign a random value of the given version (default: 4) \n rather than raise an exception.\n* Addition of ``hex_grouped`` property to provide access to grouped hex style UUIDs, formally \n provided by ``__str__``.\n\n\nTyped UUID Usage\n----------------\n\nAn extension of ``SmallUUID`` is available in the form of ``TypedSmallUUID``:\n\n.. code-block:: python\n\n >>> from smalluuid import TypedSmallUUID\n \n # Takes a type during instantiation\n >>> uuid = TypedSmallUUID(type=42)\n >>> uuid\n TypedSmallUUID('qHHvXuUwT6y7t7dnsiksvg')\n \n # Type is stored within the UUID\n >>> uuid.type\n 42\n \n # Type determined from provided UUID value\n >>> TypedSmallUUID('qHHvXuUwT6y7t7dnsiksvg').type\n 42\n\nThe use case here is that of having UUIDs from which one can determine \nboth an object's ID and the object's type/table/model.\n\nCredits\n-------\n\n*Any credits here*\n\nThis project borrowed a little code and inspiration from \nshortuuid_.\n\n``smalluuid`` is packaged using seed_.\n\n.. _seed: https://github.com/adamcharnock/seed/\n.. _shortuuid: https://github.com/stochastic-technologies/shortuuid\n.. _django-smalluuid: https://github.com/adamcharnock/django-smalluuid\n", "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/adamcharnock/smalluuid", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "smalluuid", "package_url": "https://pypi.org/project/smalluuid/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/smalluuid/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/adamcharnock/smalluuid" }, "release_url": "https://pypi.org/project/smalluuid/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Provides ShortUUID which extends Python's builtin UUID class", "version": "1.0.0" }, "last_serial": 2515263, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "2842e66afaa267587bfada011db4b316", "sha256": "3fe54804af62d7e1700e63c6b1a4293e496b3f7686117e623b74df3fc02cfbfe" }, "downloads": -1, "filename": "smalluuid-0.1.1.tar.gz", "has_sig": false, "md5_digest": "2842e66afaa267587bfada011db4b316", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2189, "upload_time": "2015-06-13T12:01:40", "url": "https://files.pythonhosted.org/packages/3e/3e/13c5df53a860b9322afb643aec8b54cd1402873ad01443b49aa85a3c7204/smalluuid-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "74fd87acc230076e16a8e3a11f1838a2", "sha256": "989721cd02af69f4f81999a97698e70d6ea9c75accb0b1443cd79ef83d2f83a5" }, "downloads": -1, "filename": "smalluuid-0.1.2.tar.gz", "has_sig": false, "md5_digest": "74fd87acc230076e16a8e3a11f1838a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 204623, "upload_time": "2015-06-13T12:06:30", "url": "https://files.pythonhosted.org/packages/ff/e5/114f64b3323eec78d1f0875355ff3316553e4ba1b09a4d15a19dd9b026fa/smalluuid-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e06ffbd0c76b94f8bb628fd406c855aa", "sha256": "726e64e1428c3ef187071fd7078c91e35380384cc9fdcadc0660f7df7d310d79" }, "downloads": -1, "filename": "smalluuid-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e06ffbd0c76b94f8bb628fd406c855aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 204702, "upload_time": "2015-06-13T12:16:00", "url": "https://files.pythonhosted.org/packages/a2/2a/037e52e3dc9510718db60458e318db4b2ca04206f82635de658e933c007a/smalluuid-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "2b3469f7c498661bf2c3a8352ed7a0c4", "sha256": "e3e72003d99dfe2a7879bbd09f0f7480ae7f90fce033adb76a27f011f0190589" }, "downloads": -1, "filename": "smalluuid-0.1.4.tar.gz", "has_sig": false, "md5_digest": "2b3469f7c498661bf2c3a8352ed7a0c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 204669, "upload_time": "2015-06-13T12:25:38", "url": "https://files.pythonhosted.org/packages/84/8b/cfb3d48323fea41ed12b2a7210fa9bc2d62872fd7ebbf2903bdcec056092/smalluuid-0.1.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "a4ccd3e40258388bd380cbefb295a16e", "sha256": "63270e09c4b9c30d0ff1fa98e3598093490e46a65934c7ef18003da670e8e04b" }, "downloads": -1, "filename": "smalluuid-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a4ccd3e40258388bd380cbefb295a16e", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 5002, "upload_time": "2016-12-12T23:03:32", "url": "https://files.pythonhosted.org/packages/83/c7/e0bf3e5009f2a41334f65937a3c9799732ce27a299a697f4c2e72ac97a94/smalluuid-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d406d314c8cdf1cdbe4c04dd0ed2b3bf", "sha256": "7d688631de5ab29239e22d782e0d5aa3e1b5ee5c440555af6415cc6576942806" }, "downloads": -1, "filename": "smalluuid-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d406d314c8cdf1cdbe4c04dd0ed2b3bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 204727, "upload_time": "2016-12-12T23:03:30", "url": "https://files.pythonhosted.org/packages/dc/df/50f1260171374d01d241320c00f0db1d360ba7e7c54e23f0d7232817f33c/smalluuid-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4ccd3e40258388bd380cbefb295a16e", "sha256": "63270e09c4b9c30d0ff1fa98e3598093490e46a65934c7ef18003da670e8e04b" }, "downloads": -1, "filename": "smalluuid-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "a4ccd3e40258388bd380cbefb295a16e", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 5002, "upload_time": "2016-12-12T23:03:32", "url": "https://files.pythonhosted.org/packages/83/c7/e0bf3e5009f2a41334f65937a3c9799732ce27a299a697f4c2e72ac97a94/smalluuid-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d406d314c8cdf1cdbe4c04dd0ed2b3bf", "sha256": "7d688631de5ab29239e22d782e0d5aa3e1b5ee5c440555af6415cc6576942806" }, "downloads": -1, "filename": "smalluuid-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d406d314c8cdf1cdbe4c04dd0ed2b3bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 204727, "upload_time": "2016-12-12T23:03:30", "url": "https://files.pythonhosted.org/packages/dc/df/50f1260171374d01d241320c00f0db1d360ba7e7c54e23f0d7232817f33c/smalluuid-1.0.0.tar.gz" } ] }