{ "info": { "author": "Grok Team", "author_email": "grok-dev@zope.org", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Zope3", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "This package provides a support to simplify the use of annotations in\nZope.\n\n.. contents::\n\nSetting up ``grokcore.annotation``\n==================================\n\nThis package is essentially set up like the `grokcore.component`_\npackage, please refer to its documentation for details. The only\nadditional ZCML line you will need is::\n\n \n\nPut this somewhere near the top of your root ZCML file but below the\nline where you include ``grokcore.component``'s configuration.\n\nExample\n=======\n\nHere a simple example of use of an annotation::\n\n import grokcore.annotation\n from zope import interface\n\n # Create a model and an interface you want to adapt it to\n # and an annotation class to implement the persistent adapter.\n class Mammoth(grokcore.annotation.Model):\n pass\n\n class ISerialBrand(interface.Interface):\n unique = interface.Attribute(\"Brands\")\n\n class Branding(grokcore.annotation.Annotation):\n grokcore.annotation.implements(ISerialBrand)\n unique = 0\n\n # Grok the above code, then create some mammoths\n manfred = Mammoth()\n mumbles = Mammoth()\n\n # creating Annotations work just like Adapters\n livestock1 = ISerialBrand(manfred)\n livestock2 = ISerialBrand(mumbles)\n\n # except you can store data in them, this data will transparently persist\n # in the database for as long as the object exists\n livestock1.unique = 101\n livestock2.unique = 102\n\n # attributes not listed in the interface will also be persisted\n # on the annotation\n livestock2.foo = \"something\"\n\nAPI Overview\n============\n\nBase classes\n------------\n\n``Annotation``\n Base class for an Annotation. Inherits from the\n persistent.Persistent class.\n\n``Model``\n Base class for a Model on which you want to use an annotation.\n\n``queryAnnotation(model, interface)``\n Query the annotation on the given model for the given\n interface. Return the annotation if found, None otherwise. This\n will not *make* any write operation.\n\n``deleteAnnotation(model, interface)``\n Look for the given annotation and delete it from the model.\n\n``LazyAnnotation``\n Base class for an annotation. It only writes a database object when\n explicitly setting values on the lazy properties.\n\n``LazyAnnotationProperty``\n Property implementation that works with ``LazyAnnotation``.\n\nIn addition, the ``grokcore.annotation`` package exposes the\n`grokcore.component`_ API.\n\n.. _grokcore.component: http://pypi.python.org/pypi/grokcore.component\n\nChanges\n=======\n\n3.0.1 (2018-01-17)\n------------------\n\n- Replace the use of `grok.implements()` with the `@grok.implementer()`\n directive throughout.\n\n3.0.0 (2018-01-12)\n------------------\n\n- Rearrange tests such that Travis CI can pick up all functional tests too.\n\n1.6 (2017-05-30)\n----------------\n\n- Add LazyAnnotation and LazyAnnotationProperty.\n\n- Drop support of Python 2.6 and claim support for Python 3.4, 3.5, 3.6 and PyPy.\n\n1.5.1 (2016-01-29)\n------------------\n\n- Update tests.\n\n1.5 (2014-10-20)\n----------------\n\n- Updating MANIFEST.in, fixing a brown paper bag release.\n\n1.4 (2014-10-17)\n----------------\n\n- Add ``queryAnnotation()`` to return an annotation. Return None if it\n doesn't exists. This helper will never do any write operation in the\n database.\n\n- Add ``deleteAnnotation()`` to delete an annotation (if it exists).\n\n1.3 (2012-05-01)\n----------------\n\n- Use ``provideAdapter()`` from grokcore.component.util.\n\n- Made package comply to zope.org repository policy.\n\n1.2 (2009-12-13)\n----------------\n\n* Use zope.container instead of zope.app.container.\n\n1.1 (2009-09-18)\n----------------\n\n* The annotation object become really a contained object to be aware\n of its context, and name.\n\n* Use 1.0b1 versions.cfg in Grok's release info instead of a local\n copy; a local copy for all grokcore packages is just too hard to\n maintain.\n\n1.0.1 (2009-06-30)\n------------------\n\n* Reupload to pypi with a correct version of Python which doesn't\n have a distutils bug.\n\n1.0 (2009-06-29)\n----------------\n\n* Created ``grokcore.Annotation`` by factoring annotation components,\n grokkers and directives out of Grok.", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/grokcore.annotation", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://grok.zope.org", "keywords": "", "license": "ZPL", "maintainer": "", "maintainer_email": "", "name": "grokcore.annotation", "package_url": "https://pypi.org/project/grokcore.annotation/", "platform": "", "project_url": "https://pypi.org/project/grokcore.annotation/", "project_urls": { "Download": "http://pypi.python.org/pypi/grokcore.annotation", "Homepage": "http://grok.zope.org" }, "release_url": "https://pypi.org/project/grokcore.annotation/3.0.1/", "requires_dist": null, "requires_python": "", "summary": "Grok-like configuration for Zope annotations", "version": "3.0.1" }, "last_serial": 3497069, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "f9cc459d58d7e7b03c381e8b4928d793", "sha256": "33bcc1469b4ded30735705730e757661913065182d0089ee7d3ce8c3d6166a44" }, "downloads": -1, "filename": "grokcore.annotation-1.0.tar.gz", "has_sig": false, "md5_digest": "f9cc459d58d7e7b03c381e8b4928d793", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7569, "upload_time": "2009-06-29T17:19:21", "url": "https://files.pythonhosted.org/packages/57/e4/3596510ea76a548351e03165336f78dff8a6993e185979a76b0f19eed140/grokcore.annotation-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ae8aa722e544972f573e9f2fbb13dac9", "sha256": "90c18519acdd2b154c5376a4539cb9bb8d2e8d1ffcb9428995425efbe30d2eb0" }, "downloads": -1, "filename": "grokcore.annotation-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ae8aa722e544972f573e9f2fbb13dac9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10775, "upload_time": "2009-06-30T19:38:43", "url": "https://files.pythonhosted.org/packages/57/e2/ccd83a73ae9bad575c36a50f57bbb993449f43869f736f295f170d8de65e/grokcore.annotation-1.0.1.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "a28ccb4b7c86198923d9cce40953314f", "sha256": "f5c599d87d90f4a00314424b06393d39e77ab20c92751025fffaec2094b78e36" }, "downloads": -1, "filename": "grokcore.annotation-1.1.tar.gz", "has_sig": false, "md5_digest": "a28ccb4b7c86198923d9cce40953314f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10336, "upload_time": "2009-09-18T10:35:28", "url": "https://files.pythonhosted.org/packages/4e/08/4feafd0c15a139be67fd3a367c11068bfed5336270905ff0e7d4969113b7/grokcore.annotation-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "b6227e879913548b687f168c25bd0468", "sha256": "e9149076bf5a0f313adcd22ddc882a106da1eccaacad5e46ac95d1285ba5dcd4" }, "downloads": -1, "filename": "grokcore.annotation-1.2.tar.gz", "has_sig": false, "md5_digest": "b6227e879913548b687f168c25bd0468", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9508, "upload_time": "2009-12-13T21:05:12", "url": "https://files.pythonhosted.org/packages/87/56/fb6c196a6f361dc8407ef90a0009d7c9644209d012428c1ecea6d54bd66b/grokcore.annotation-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "418a67c1873e5987639b268b7389027b", "sha256": "727213357ba6785c89da4e9be64e10bcf1dab011d9337cac2fb82d8d8e813019" }, "downloads": -1, "filename": "grokcore.annotation-1.3.tar.gz", "has_sig": false, "md5_digest": "418a67c1873e5987639b268b7389027b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12369, "upload_time": "2012-05-01T19:16:07", "url": "https://files.pythonhosted.org/packages/4c/b5/753ec4702b6576db2706338c2f81f7db3841571219a11bb8b484f5260050/grokcore.annotation-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "efb8fc8bf579d50dfca8692c72d08674", "sha256": "1e10976183d4ddc6aa19a05f2f74fa0c2fc70ff8d3fbb7df4d64aca24a83933a" }, "downloads": -1, "filename": "grokcore.annotation-1.4.tar.gz", "has_sig": false, "md5_digest": "efb8fc8bf579d50dfca8692c72d08674", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10264, "upload_time": "2014-10-20T05:49:24", "url": "https://files.pythonhosted.org/packages/3d/93/eabbfed544dd27e95df8f7facf8f45588b7bf66b19b946cd16e02e838722/grokcore.annotation-1.4.tar.gz" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "000a15b37c76e6924614c08207cf5637", "sha256": "5bae1f410b70eca0ed1e6dd5c4bf6dfa2a3558b62ef314d384307d1a9c16b569" }, "downloads": -1, "filename": "grokcore.annotation-1.5.zip", "has_sig": false, "md5_digest": "000a15b37c76e6924614c08207cf5637", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20628, "upload_time": "2014-10-20T12:18:12", "url": "https://files.pythonhosted.org/packages/24/8f/565f686d914b870eb28fc1cea02a8282a3e109888d38effd510fee1e809d/grokcore.annotation-1.5.zip" } ], "1.5.1": [ { "comment_text": "", "digests": { "md5": "64f55ec8f5b02a07e24849845efffd5d", "sha256": "73f474de2f740d72988b40f93c014c0bc545419bd0d7f9762c53654899f34619" }, "downloads": -1, "filename": "grokcore.annotation-1.5.1.tar.gz", "has_sig": false, "md5_digest": "64f55ec8f5b02a07e24849845efffd5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12848, "upload_time": "2016-01-29T13:05:43", "url": "https://files.pythonhosted.org/packages/be/e3/c75ae7154c7768c63af8a98b8dd9253400063c23bab3a2e31d76dbd195d5/grokcore.annotation-1.5.1.tar.gz" } ], "1.6": [ { "comment_text": "", "digests": { "md5": "ffd61842187e3293a0f3b4e54a3e8504", "sha256": "910284fde3b1c5aed8d0e059753723bbe76243548d25b68eb294f17df37ab390" }, "downloads": -1, "filename": "grokcore.annotation-1.6.tar.gz", "has_sig": false, "md5_digest": "ffd61842187e3293a0f3b4e54a3e8504", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15047, "upload_time": "2017-05-30T08:53:17", "url": "https://files.pythonhosted.org/packages/25/6a/3ed2a3d39124467d58e99ca1409016520c050b49037705d464b45773e355/grokcore.annotation-1.6.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "4f9b5c0ac337ebccc8dc9b0c7857a9dc", "sha256": "138149d2fa0e30aeee19a4d08e710847d7325c37d71d9f7586e122c0be976f95" }, "downloads": -1, "filename": "grokcore.annotation-3.0.0.tar.gz", "has_sig": false, "md5_digest": "4f9b5c0ac337ebccc8dc9b0c7857a9dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15499, "upload_time": "2018-01-12T12:42:58", "url": "https://files.pythonhosted.org/packages/0d/c3/ad3a0ccc5709300579d1d48c469a0618c91f41c2e894904f43059f19978c/grokcore.annotation-3.0.0.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "b5ebf33203dd57f02353db0d9ac7629b", "sha256": "6162264b54f32b6a38549e10fce810cdeb0552d72d7f0a1ed0976e28c23c2e52" }, "downloads": -1, "filename": "grokcore.annotation-3.0.1.tar.gz", "has_sig": false, "md5_digest": "b5ebf33203dd57f02353db0d9ac7629b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15636, "upload_time": "2018-01-17T13:17:25", "url": "https://files.pythonhosted.org/packages/64/7f/7d2df215bfb2e7eed9bc91886bd75bdde8c956f2a9454c720747b30ffea2/grokcore.annotation-3.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b5ebf33203dd57f02353db0d9ac7629b", "sha256": "6162264b54f32b6a38549e10fce810cdeb0552d72d7f0a1ed0976e28c23c2e52" }, "downloads": -1, "filename": "grokcore.annotation-3.0.1.tar.gz", "has_sig": false, "md5_digest": "b5ebf33203dd57f02353db0d9ac7629b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15636, "upload_time": "2018-01-17T13:17:25", "url": "https://files.pythonhosted.org/packages/64/7f/7d2df215bfb2e7eed9bc91886bd75bdde8c956f2a9454c720747b30ffea2/grokcore.annotation-3.0.1.tar.gz" } ] }