usrlocalben / pydux Goto Github PK
View Code? Open in Web Editor NEWPydux = Python + Redux
License: MIT License
Pydux = Python + Redux
License: MIT License
Hey, thanks for this. Looking to move our Braille reader UI over to using it.
Would be good if the top level functions were re-exported from __init__.py
so that you can do, for instance:
import pydux
pydux.create_store(reducer)
Could you clarify what license you are releasing this under please?
The tarball on PyPI for version 0.2.0 is missing the README.md file, which causes pip install
to fail:
Collecting pydux>=0.1.0 (from urwid_pydux==0.2.0->-r ./edge_vm_installer/requirements.txt (line 4))
Downloading pydux-0.2.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-ESMAa7/pydux/setup.py", line 17, in <module>
long_description=open('README.md').read(),
IOError: [Errno 2] No such file or directory: 'README.md'
The combine function is causing a huge performance degradation by using the equality operator !=
instead of is not
.
pydux/pydux/combine_reducers.py
Lines 77 to 78 in 943ca1c
This causes the whole state to be compared on each action that reaches the reducer, even if the actions are not handled in any reducer at all.
When the state consists of dictionaries, is not that obvious because dictionary comparison is very fast.
When the state consists of 'normal' class objects its also fast because __eq__
falls back to comparing identity using is
.
When we modeled our state using pydantic it converts the objects to dicts first to compare for equality when using !=
which caused a significant performance impact.
We simply fixed it using is not
in the combine function.
So you can:
store.subscribe(listener)
rather than:
store['subscribe'](listener)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.