This project is a fork of gocept.sequence (http://pypi.python.org/pypi/gocept.sequence/) originally created by Daniel Havlik and Sebastian Wehrmann.
cykooz.sequence
Generates a persistent sequence.
Sequences
>>> import persistent >>> import zope.annotation.interfaces >>> from zope.interface import implements
We need a testobject, where the SequenceGenerator stores his data:
>>> class Dummy(persistent.Persistent): ... implements(zope.annotation.interfaces.IAttributeAnnotatable)
>>> test_object = Dummy()
You get a SequenceGenerator by adapting to ISequenceGenerator:
>>> from cykooz.sequence.interfaces import ISequenceGenerator >>> seq_gen = ISequenceGenerator(test_object)
You get a sequence like this:
>>> seq_gen.getNextValue() 1 >>> seq_gen.getNextValue() 2 >>> seq_gen.getNextValue() 3
You can also set the generator to a value:
>>> seq_gen.setNextValue(1) >>> seq_gen.getNextValue() 1
>>> seq_gen.setNextValue(5) >>> seq_gen.getNextValue() 5 >>> seq_gen.getNextValue() 6 >>> seq_gen.getNextValue() 7 >>> seq_gen.getNextValue() 8
But setNextValue only accepts integer arguments:
>>> seq_gen.setNextValue('1')
Traceback (most recent call last):
...
ValueError: setNextValue expected Integer, <type 'str'> found.
>>> seq_gen.setNextValue(3.14) Traceback (most recent call last): ... ValueError: setNextValue expected Integer, <type 'float'> found.
Changes
1.0.2 (2011-05-17)
Fix tests.
1.0.1 (2011-05-16)
Fix interface name for getting annotations.
1.0.0 (2011-04-14)
Removed old migration code.
Removed the dependency from Persistence.
Metadata
Release files for cykooz.sequence 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cykooz.sequence-1.0.2.tar.gz | 3.9 kB | Without provenance | Details for cykooz.sequence-1.0.2.tar.gz |
Release files / cykooz.sequence-1.0.2.tar.gz
| Download URL | cykooz.sequence-1.0.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9464bfbe402fddcc8f905da039f1edd63518c61350bc2eb7499667911c649446
|
|
BLAKE2b-256 checksum How to use checksums |
03014d84b2e5eea508480327796a9cfb130ac54ab584bf1421ac37ae2592d859
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for cykooz.sequence 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.