Skip to content

ebrakke/python-redux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Redux

This is a port from the popular state management library redux but written entirely in Python. All functionality (with the exception of the async testing done with redux-thunk and the Symbol Obversable stuff) have been converted into python. This includes all relevant unit tests as well.

NOTE: Only works with python 3.4.3 or greater

Usage

Include the python_redux folder in your application (Not yet a pip package)

from python_redux import create_store, combine_reducers
from reducers import todos, filter

store = create_store(combine_reducers({
  'todos': todos,
  'filter': filter
}))

store['dispatch'](dict(type='ADD_TODO', text='Hello'))

print(store['get_state']().get('todos')) # ['Hello']

Tests

Run python tests.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages