time set: all the states of a Python set data structure over time, without storing every complete version, and with nice ‘as-of’ (at) access.
Implementation: Currently stores the most recent version completely, so accessing the most recent version is not too slow. Accessing older versions is slower because it walks through the history. The whole thing will eventually slow down when there are tons of versions because it goes through all the version times fairly naively.
Usage
> from tset import Tset
> from datetime import datetime
> beginning = datetime.now()
> t = Tset(range(1,5))
> middle = datetime.now()
> t.value(range(3,8))
> t.value()
# {3, 4, 5, 6, 7}
> t.value(at=middle)
# {1, 2, 3, 4}
> t.value(at=beginning)
# {}
Tests
Run the tests with nosetests or python -m test.
Context
The idea of preserving data history is not unique. There is a considerable work on persistent data structures (which is quite distinct from the idea of persisting data to disk). Interesting related (and more comprehensive) implementations include ZODB’s Generational Sets, dat, and Datomic.
Metadata
Release files for tset 0.1.1
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 | |
|---|---|---|---|---|
| tset-0.1.1.tar.gz | 3.2 kB | Without provenance | Details |
Release files / tset-0.1.1.tar.gz
| Download URL | tset-0.1.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7af737b201fed19fbe6606c335f2c6ecf0e41015e6fbe4606ea64ad8bccd9bac
|
|
BLAKE2b-256 checksum How to use checksums |
86ea63b86f917478fbee56fd38d730cff936e5e30b95f8012f7b535f408a042d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for tset 0.1.1
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.