{ "info": { "author": "Daniel Havlik, Sebastian Wehrmann", "author_email": "dh@gocept.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP" ], "description": "This package lets you generate a persistent sequence. That means in practice,\nthat you can generate sequent numbers without having to worry about storing\nthe last generated number. This is done by gocept.sequence within the\nannotation of an object you provide.\n\n\n===============\ngocept.sequence\n===============\n\nSequences\n=========\n\n>>> import Persistence\n>>> import zope.annotation.interfaces\n>>> from zope.interface import implements\n\n\nWe need a testobject, where the SequenceGenerator stores his data:\n\n>>> class Dummy(Persistence.Persistent):\n... implements(zope.annotation.interfaces.IAttributeAnnotatable)\n\n>>> test_object = zope.annotation.interfaces.IAnnotations(Dummy())\n\n\nYou get a SequenceGenerator by adapting to ISequenceGenerator:\n\n>>> from gocept.sequence.interfaces import ISequenceGenerator\n>>> seq_gen = ISequenceGenerator(test_object)\n\n\nYou get a sequence like this:\n\n>>> seq_gen.getNextValue()\n1\n>>> seq_gen.getNextValue()\n2\n>>> seq_gen.getNextValue()\n3\n\n\nYou can also set the generator to a value:\n\n>>> seq_gen.setNextValue(1)\n>>> seq_gen.getNextValue()\n1\n\n>>> seq_gen.setNextValue(5)\n>>> seq_gen.getNextValue()\n5\n>>> seq_gen.getNextValue()\n6\n>>> seq_gen.getNextValue()\n7\n>>> seq_gen.getNextValue()\n8\n\n\nBut setNextValue only accepts integer arguments:\n\n>>> seq_gen.setNextValue('1')\nTraceback (most recent call last):\n...\nValueError: setNextValue expected Integer, found.\n\n>>> seq_gen.setNextValue(3.14)\nTraceback (most recent call last):\n...\nValueError: setNextValue expected Integer, found.\n\n\nChanges\n=======\n\n\n0.4 (unreleased)\n----------------\n\n\n0.31 (2008-07-21)\n----------------\n\n- added migration code and tests for the bugfix of release 0.3\n- added README text and CHANGELOG\n\n\n0.3 (2008-07-21)\n----------------\n\n- fixed a bug with Plone, where the dot in the annotation key caused an access\n error\n- improved readability of test cases\n\n0.1\n---\n\n- initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/gocept.sequence/", "keywords": "sequence generator", "license": "ZPL 2.1", "maintainer": null, "maintainer_email": null, "name": "gocept.sequence", "package_url": "https://pypi.org/project/gocept.sequence/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gocept.sequence/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/gocept.sequence/" }, "release_url": "https://pypi.org/project/gocept.sequence/0.31/", "requires_dist": null, "requires_python": null, "summary": "Generates a sequence", "version": "0.31" }, "last_serial": 792583, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "68522df122fba5a939ecd04d1d89a683", "sha256": "4558ef45c9d0cb2217be669500b170a7a00a929ecf31f68a247ec971cf0debef" }, "downloads": -1, "filename": "gocept.sequence-0.1.tar.gz", "has_sig": false, "md5_digest": "68522df122fba5a939ecd04d1d89a683", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4145, "upload_time": "2007-11-20T21:40:29", "url": "https://files.pythonhosted.org/packages/3c/10/b361332eba07f0832c15fd585f821cb587c3bebd155aac713743d2935f22/gocept.sequence-0.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "caa413b47760bcb47f49c76836fc0afb", "sha256": "21b085d47bf6800b4f334a53f9ed8161e0211a1466b48efcd40ce830aae2bc24" }, "downloads": -1, "filename": "gocept.sequence-0.3.tar.gz", "has_sig": false, "md5_digest": "caa413b47760bcb47f49c76836fc0afb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4491, "upload_time": "2008-07-21T13:19:28", "url": "https://files.pythonhosted.org/packages/27/44/5ece9e3b2cf9dcc7d7b81122633d4a211bf9163fb14425be84acb1420cd5/gocept.sequence-0.3.tar.gz" } ], "0.31": [ { "comment_text": "", "digests": { "md5": "efc55e1f5e092e91b89b3cff0492b9c9", "sha256": "1f6be26fde2929651a551805d25c7c6ccb21579ee8f95dcda753b748db58d795" }, "downloads": -1, "filename": "gocept.sequence-0.31.tar.gz", "has_sig": false, "md5_digest": "efc55e1f5e092e91b89b3cff0492b9c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5191, "upload_time": "2008-07-22T08:06:59", "url": "https://files.pythonhosted.org/packages/e8/0b/dccf6e6fc62825a2d0a71566861393d18901b6f33a647ac4205ec75c0304/gocept.sequence-0.31.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "efc55e1f5e092e91b89b3cff0492b9c9", "sha256": "1f6be26fde2929651a551805d25c7c6ccb21579ee8f95dcda753b748db58d795" }, "downloads": -1, "filename": "gocept.sequence-0.31.tar.gz", "has_sig": false, "md5_digest": "efc55e1f5e092e91b89b3cff0492b9c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5191, "upload_time": "2008-07-22T08:06:59", "url": "https://files.pythonhosted.org/packages/e8/0b/dccf6e6fc62825a2d0a71566861393d18901b6f33a647ac4205ec75c0304/gocept.sequence-0.31.tar.gz" } ] }