{ "info": { "author": "Martin Aspeli", "author_email": "optilude@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Plone :: 4.3", "Framework :: Plone :: 5.0", "Framework :: Plone :: 5.1", "Framework :: Plone :: 5.2", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5" ], "description": "plone.uuid\n==========\n\nThis is a minimal package that can be used to obtain a universally unique\nidentifier (UUID) for an object.\n\nThe default implementation uses the Python standard library ``uuid`` module\nto generate an RFC 4122-compliant UUID, using the ``uuid4()`` function. It\nwill assign a UUID upon object creation (by subscribing to\n``IObjectCreatedEvent`` from ``zope.lifecycleevent``) and store it in an\nattribute on the object.\n\n Why use an attribute and not annotations? The most common form of annotation\n is the one provided by ``IAttributeAnnotations``. This stores annotations in\n a BTree in an attribute called ``__annotations__``, which means that\n annotation values do not end up in the same ZODB persistent object as the\n parent. This is good for \"large\" values, but not very good for small ones\n that are frequently required, as it requires a separate ZODB object load.\n\nSimple usage\n============\n\nTo automatically assign a UUID to your objects using the default\nimplementation outlined above, you should:\n\n* Make sure they implement ``plone.uuid.interfaces.IAttributeUUID``. You\n can do this in code, via the ``implements()`` directive, or in ZCML, with\n a statement like::\n\n \n \n \n\n* Make sure that an ``IObjectCreatedEvent`` is fired for this object when it\n is first created.\n\nOnce the event handler has triggered, you can obtain a UUID by adapting the\nobject to the ``IUUID`` interface::\n\n from plone.uuid.interfaces import IUUID\n uuid = IUUID(context)\n\nThe ``uuid`` variable will now be a (byte) string containing a UUID. If the\nUUID has not yet been assigned, adaptation will fail with a ``TypeError``.\n\nIf you would rather get ``None`` instead of a ``TypeError``, you can do::\n\n uuid = IUUID(context, None)\n\nUUID view\n=========\n\nIf you require a UUID in a page template or remotely, you can use the\n``@@uuid`` view, which is registered for all objects that provide the\n``IUUIDAware`` marker interface (which is a super-interface of the\n``IAttributeUUID`` marker seen above).\n\nFor example::\n\n
\n ...\n
\n\nThe view simply returns the UUID string as looked up by the ``IUUID`` adapter.\n\nCustomising behaviour\n=====================\n\nThere are two primary customisation points for this package:\n\n* You can change the default UUID generating algorithm by overriding the\n unnamed utility providing the ``IUUIDGenerator`` interface. The default\n implementation simply calls ``uuid.uuid4()`` and casts the result to a\n ``str``.\n\n* You can change the UUID storage by providing a custom ``IUUID`` adapter\n implementation. If you do this, you must also provide a mechanism for\n assigning UUIDs upon object creation, usually via an event handler. To\n obtain a UUID, use the ``IUUIDGenerator`` interface::\n\n from zope.component import getUtility\n from plone.uuid.interfaces import IUUIDGenerator\n\n generator = getUtility(IUUIDGenerator)\n uuid = generator()\n\n You should also make sure that instances with a UUID provide a sub-interface\n of ``plone.uuid.interfaces.IUUIDAware``.\n\nChangelog\n=========\n\n1.0.5 (2018-01-18)\n------------------\n\nBug fixes:\n\n- Fix package dependencies.\n [gforcada]\n\n- Fix documentation and uuid generator class name to reflect the fact that we use the ``uuid4`` implementation instead of ``uuid1``.\n [thet]\n\n\n1.0.4 (2016-06-02)\n------------------\n\nBug fixes:\n\n- Update setup.py url to point to github.\n [esteele]\n\n- Fixed issues preventing tests passing on Python 3\n [datakurre]\n\n\n1.0.3 (2012-05-31)\n------------------\n\n- Use zope.browserpage.\n [hannosch]\n\n- Defensive UUID assignment in addAttributeUUID() handler: keep existing\n UUID value if handler called more than once, except in case of object\n copy event, where original and destination should have distinct UUID.\n [seanupton]\n\n\n1.0.2 - 2011-10-18\n------------------\n\n- Generate UUID without dashes.\n [elro]\n\n\n1.0.1 - 2011-05-20\n------------------\n\n- Relicense under modified BSD license.\n See http://plone.org/foundation/materials/foundation-resolutions/plone-framework-components-relicensing-policy\n [davisagli]\n\n\n1.0 - 2011-05-13\n----------------\n\n- Release 1.0 Final\n [esteele]\n\n- Add MANIFEST.in.\n [WouterVH]\n\n\n1.0b2 - 2011-01-03\n------------------\n\n- Add MutableUUID component\n [toutpt]\n\n\n1.0b1 - 2010-11-27\n------------------\n\n- Initial release\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/plone/plone.uuid", "keywords": "plone uuid", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "plone.uuid", "package_url": "https://pypi.org/project/plone.uuid/", "platform": "", "project_url": "https://pypi.org/project/plone.uuid/", "project_urls": { "Homepage": "https://github.com/plone/plone.uuid" }, "release_url": "https://pypi.org/project/plone.uuid/1.0.5/", "requires_dist": [ "Acquisition", "setuptools", "zope.component", "zope.browserpage", "zope.interface", "zope.lifecycleevent", "zope.publisher", "zope.configuration; extra == 'test'", "zope.event; extra == 'test'" ], "requires_python": "", "summary": "UUIDs for content items", "version": "1.0.5" }, "last_serial": 3501183, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "e851907809c8ed98d799e34b8b53d0af", "sha256": "dd1a81989c31a3895be6111abcaa671ac0481a76d6a08a2acff56c95d0284607" }, "downloads": -1, "filename": "plone.uuid-1.0.zip", "has_sig": false, "md5_digest": "e851907809c8ed98d799e34b8b53d0af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26996, "upload_time": "2011-05-13T17:38:50", "url": "https://files.pythonhosted.org/packages/f7/dc/615a6ca6f5d94ea07bde9c221ac8f62c64b8582b6f4361d31b1a6f255684/plone.uuid-1.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "5d0738724fe191b261137e006f5b74cb", "sha256": "d2941761098e47b510a00c13d317290742ae9853989e2c1ac0d5e23c1efc410d" }, "downloads": -1, "filename": "plone.uuid-1.0.1.zip", "has_sig": false, "md5_digest": "5d0738724fe191b261137e006f5b74cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14521, "upload_time": "2011-05-20T18:51:26", "url": "https://files.pythonhosted.org/packages/a9/23/5e2b78663e8c25b172457d267ff633d85c4f47f94fd86b572db572647f78/plone.uuid-1.0.1.zip" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "498c286c250902a97f0da190e3d7b929", "sha256": "07194ca38412b972ce970560eb79e3161ab8f7bde6b929065af67abae40e608a" }, "downloads": -1, "filename": "plone.uuid-1.0.2.zip", "has_sig": false, "md5_digest": "498c286c250902a97f0da190e3d7b929", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14627, "upload_time": "2011-10-18T20:08:54", "url": "https://files.pythonhosted.org/packages/15/4b/4a7c68f112737244fd87ab9848d8156605606d8f5abeda748d6b86704215/plone.uuid-1.0.2.zip" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "183fe2911a7d6c9f6b3103855e98ad8a", "sha256": "db6773f62a97f84ab5f96e727310eeee36cbf30cb1d8be906390ff46d17487c8" }, "downloads": -1, "filename": "plone.uuid-1.0.3.zip", "has_sig": false, "md5_digest": "183fe2911a7d6c9f6b3103855e98ad8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15353, "upload_time": "2012-05-31T15:34:19", "url": "https://files.pythonhosted.org/packages/5a/7d/7b3f6ad981bef60d4c604e9639362143f3a289feb4622c16f34bae0a9373/plone.uuid-1.0.3.zip" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "a94a359ac348fc0eff6421334c747f26", "sha256": "49771e3386073fac1b2bfd23c5a5f8d8065df2d6676b09a43c7143ed7f366bd4" }, "downloads": -1, "filename": "plone.uuid-1.0.4.tar.gz", "has_sig": false, "md5_digest": "a94a359ac348fc0eff6421334c747f26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7524, "upload_time": "2016-06-01T22:49:29", "url": "https://files.pythonhosted.org/packages/61/67/e5d8f8d5c7737637ffb00df101efba3e0ab18712b06fc66b6e3640f28dd2/plone.uuid-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "c5362add5ad2a48158ad51bbc50d9f57", "sha256": "cb08ead97e2ad505aade32960122bcf855345565b248c81d12f19bb2a4029730" }, "downloads": -1, "filename": "plone.uuid-1.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "c5362add5ad2a48158ad51bbc50d9f57", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11487, "upload_time": "2018-01-18T15:08:50", "url": "https://files.pythonhosted.org/packages/2b/89/3d8c0eb7e98c03005c6d65464fd784f898894bfe1bf1801b2c8c4f49a44b/plone.uuid-1.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57faacfd142f91bdf38faab502f26b81", "sha256": "6e7339a1f4acd3506cf375da299dcce7bf8cc21263ad20d49f7c7e814484229b" }, "downloads": -1, "filename": "plone.uuid-1.0.5.tar.gz", "has_sig": false, "md5_digest": "57faacfd142f91bdf38faab502f26b81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9161, "upload_time": "2018-01-18T15:08:51", "url": "https://files.pythonhosted.org/packages/2f/68/899c6fcd1c09720fbdddbc29d6733a72209f87c8347353b8954cd6fdde3e/plone.uuid-1.0.5.tar.gz" } ], "1.0b1": [ { "comment_text": "", "digests": { "md5": "40c2fddfe06f6bf0c7fcc92983749732", "sha256": "24cdf3a68d8a8831073f6a3ec7d5a3b58c6de9dd4ceafcfb83ae249f8ad30e6d" }, "downloads": -1, "filename": "plone.uuid-1.0b1.zip", "has_sig": false, "md5_digest": "40c2fddfe06f6bf0c7fcc92983749732", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19933, "upload_time": "2010-11-27T21:04:32", "url": "https://files.pythonhosted.org/packages/d4/e9/f05e33f9f767d5a03b5480e6e450836d1638da0819c1efb13f50db5ba809/plone.uuid-1.0b1.zip" } ], "1.0b2": [ { "comment_text": "", "digests": { "md5": "6a91bc5d155b20c5e77c4fb79c1ff78a", "sha256": "8d426364f3dc995f8a39f0003d3a45cb66fc96a7c8050167d84b6f6a1ca977a4" }, "downloads": -1, "filename": "plone.uuid-1.0b2.zip", "has_sig": false, "md5_digest": "6a91bc5d155b20c5e77c4fb79c1ff78a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20403, "upload_time": "2011-01-04T04:18:15", "url": "https://files.pythonhosted.org/packages/9c/58/18d161fe23bca2709808ac5623212f3aeb8a663387d6a08086b493d3ec91/plone.uuid-1.0b2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c5362add5ad2a48158ad51bbc50d9f57", "sha256": "cb08ead97e2ad505aade32960122bcf855345565b248c81d12f19bb2a4029730" }, "downloads": -1, "filename": "plone.uuid-1.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "c5362add5ad2a48158ad51bbc50d9f57", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11487, "upload_time": "2018-01-18T15:08:50", "url": "https://files.pythonhosted.org/packages/2b/89/3d8c0eb7e98c03005c6d65464fd784f898894bfe1bf1801b2c8c4f49a44b/plone.uuid-1.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57faacfd142f91bdf38faab502f26b81", "sha256": "6e7339a1f4acd3506cf375da299dcce7bf8cc21263ad20d49f7c7e814484229b" }, "downloads": -1, "filename": "plone.uuid-1.0.5.tar.gz", "has_sig": false, "md5_digest": "57faacfd142f91bdf38faab502f26b81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9161, "upload_time": "2018-01-18T15:08:51", "url": "https://files.pythonhosted.org/packages/2f/68/899c6fcd1c09720fbdddbc29d6733a72209f87c8347353b8954cd6fdde3e/plone.uuid-1.0.5.tar.gz" } ] }