Skip to content
kirangadhavePublic

About

A repository for time-travel-anywidget

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

trrackpy

CI PyPI - trrack PyPI - trrack-widget

Track the state of anywidget widgets.

Read the documentation at kirangadhave.me/trrackpy.

from trrack_widget import JsonFileStore, Persisted, Trrackable

Persisted(counter, store=JsonFileStore("state.json"))   # comes back as you left it
Trrackable(counter)                                      # undo, redo, and branch
  • Persisted saves a widget's state and restores it the next time it loads.
  • Trrackable records every change as a history you can navigate.
  • A store decides where the state lives: a file, a database, the URL. Write your own with two methods.

Packages

Package What Docs
trrack-widget Persisted and Trrackable, the two widget wrappers. packages/trrack-widget
trrack The branching history model and the stores. Pure Python, no UI dependencies. packages/trrack

Examples

Runnable marimo notebooks are in examples.

Contributing

See CONTRIBUTING.md for setup, the dev loop, and releases.

License

BSD-3-Clause. trrackpy is the Python sibling of trrackjs.

About

A repository for time-travel-anywidget

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages