unredoable
Python package providing object-specific undoing & redoing functionality through wrapper class
Download
pip install unredoable
Usage
from unredoable import Unredoable
class StateManager:
def __init__(self, state_variable):
self.unredoable_state_variable = Unredoable(state_variable, max_stack_depths=10, craft_deep_copies=False)
# state_variable may be of whatever type, whether custom or not,
# the sole restraint it's subject to, is that is needs to implement
# either __copy__ or __deepcopy__, depending on the passed
# 'craft_deep_copies' parameter
def alter_state_variable(self):
self.unredoable_state_variable.push_state()
self.unredoable_state_variable.obj += 1
if __name__ == '__main__':
manager = StateManager(69)
manager.alter_state_variable()
manager.alter_state_variable()
manager.unredoable_state_variable.undo() # unredoable_state_variable = 70
manager.unredoable_state_variable.redo() # unredoable_state_variable = 71
Author
Janek Zangenberg
License
Metadata
Release files for unredoable 0.0.5
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 |
|---|---|---|---|---|
| unredoable-0.0.5.tar.gz | 3.8 kB | Without provenance | Details for unredoable-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unredoable-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for unredoable-0.0.5-py3-none-any.whl |
Total release size: 7.7 kB
Release files / unredoable-0.0.5.tar.gz
| Download URL | unredoable-0.0.5.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a950d6e77f1db18075b089c27e231a83eb0c4907ecbe9e304709a0d4bb3e9b1
|
|
BLAKE2b-256 checksum How to use checksums |
2644a7e6271c503b66f089dcf5a79fb2bd15816a26e756dca07646366247ba1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-46-generic
|
Release files / unredoable-0.0.5-py3-none-any.whl
| Download URL | unredoable-0.0.5-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df242d3e0b72eacb830e74fff42ca36536ceb7c8b5a171ad8e653d689e968ad9
|
|
BLAKE2b-256 checksum How to use checksums |
788e3fef64590465f9182b25669048654fbb518b6a7e584bc6a080e8e875d5d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.8.13 Linux/5.15.0-46-generic
|
Security for unredoable 0.0.5
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.