![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
A simple state manager implementing the memento design pattern and heavily based on the tutorial from refactoring.guru.
The brackette (a bracket-cassette) logo was scribbled by @PostSin on slatepacks.com marketplace for which I paid 2ツ (ツ is grin cryptocurrency) and it was best deal ever!
from brackette.memento import Originator, Caretaker
originator = Originator()
caretaker = Caretaker(originator)
originator.do_stuff('hello')
print(originator._state)
print(originator._hash)
caretaker.backup()
originator.do_stuff('meoreo')
print(originator._state)
print(originator._hash)
caretaker.backup()
originator.do_stuff('kinda')
print(originator._state)
print(originator._hash)
caretaker.backup()
caretaker.undo()
print(originator._state)
print(originator._hash)
caretaker.undo()
print(originator._state)
print(originator._hash)
caretaker.redo()
print(originator._state)
print(originator._hash)
caretaker.undo()
print(originator._state)
print(originator._hash)
caretaker.show_history()
outputs
hello
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
meoreo
bbba0753c25637757dd58e943bf8089f66aa5a408cc1764458230e3112ab41e1
kinda
29f0e99be96b1bf5bfb5902b10171f4b7d8135fe205fc8c94b81754c0d661513
meoreo
bbba0753c25637757dd58e943bf8089f66aa5a408cc1764458230e3112ab41e1
hello
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
meoreo
bbba0753c25637757dd58e943bf8089f66aa5a408cc1764458230e3112ab41e1
hello
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Caretaker: Here's the list of past mementos:
2021-04-27 14:25:43 UTC 6411ee087bfe7ce14043d451748b5199ef7ccaa42aa6e0f8ab2c63de94281c7d
Caretaker: Here's the list of future mementos:
2021-04-27 14:25:43 UTC 2783de246149f2cfec85bf718a938ddcb0c1bdad249afc56f53882c6de3f8475
2021-04-27 14:25:43 UTC 0a14b4c21ac263fe47312f688975fc1022feb531db396dca9eb9ed0571f862ee
FAQs
Package that manages a state using memento design pattern
We found that brackette demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.