Version 0.1.0
Limited Ordered Set
Data type for storing sorted list of objects with sort order and list length limit. Useful for storing data like history of user interactions on site.
Once added object to list overflow set length, it pop items from set beginning of set. You always have only last X entries limited b length property.
Installation
You can simple install library with pip install limited-ordered-set.
Example
You can add as many as you want objects to LimitedOrderedSet, it will pop first items once items count hit limit.
For example you can go to tests.:
limit = 10
objcts = LimitedOrderedSet(limit)
print 'Adding chars: ',
for x in xrange(0, 50):
c = choice(string.ascii_letters)
print c,
objcts.add(c)
print
print 'Resulting set items: %s' % ",".join(objcts)
Execution result
Adding chars: B Z V N F k j j o v t M k j P v A Y O h E v f A g e F T Q b f r j t W q r C C S m P V m o B z a L w
Resulting set items: S,m,P,V,o,B,z,a,L,w
Contribution
You always are welcome if you have any ideas. You can push request at github project page.
Metadata
Release files for limited-ordered-set 0.1.0
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 |
|---|---|---|---|---|
| limited-ordered-set-0.1.0.tar.gz | 2.4 kB | Without provenance | Details for limited-ordered-set-0.1.0.tar.gz |
Release files / limited-ordered-set-0.1.0.tar.gz
| Download URL | limited-ordered-set-0.1.0.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec40f1298d569ee705368e9c0531e8aecd55dbfeeca0c0e9ccb65da0faf10955
|
|
BLAKE2b-256 checksum How to use checksums |
319b881640b952bdef5203a77d23ac113ac0d69f5c5b54ffe60c2700bdc6d0ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for limited-ordered-set 0.1.0
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.