Overview
Python Hooks, a React inspired way to code in Python.
- âĄïļ Written with performance in mind (Not using inspect module)
- ð Support for familiar React like hooks such as
use_state
,use_effect
,use_reducer
,use_context
and more. - ð ïļ Built with plugins support and easy to extend.
- ðĪ Python 3.9+ compatibility
- ðŠķ Lightweight to remove the need for a lot of boilerplate code.
- ðĶ Support for different backend state-stores.
- ð§ Support for hooks-state scoping.
- ð Redis and Zustand plugins out of the box.
- ð Tested mainly on CPython.
API Example
As Python is commonly used to create APIs, I wanted to provide one real-world example of using hooks for state management in Flask. Note, that this is just one example and the library can be used in many other ways. See examples for more examples.
See Getting started for a quick tutorial on how to use the library.
See Inspiration for a more in-depth explanation of the motivation behind this project.