reactivex 4.0.0a2__tar.gz → 5.0.0a2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reactivex might be problematic. Click here for more details.
- reactivex-5.0.0a2/.gitignore +85 -0
- {reactivex-4.0.0a2 → reactivex-5.0.0a2}/LICENSE +20 -20
- reactivex-5.0.0a2/PKG-INFO +213 -0
- reactivex-5.0.0a2/README.rst +186 -0
- reactivex-5.0.0a2/pyproject.toml +121 -0
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/__init__.py +1330 -1323
- reactivex-5.0.0a2/reactivex/_version.py +1 -0
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/abc/__init__.py +22 -22
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/abc/disposable.py +33 -31
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/abc/observable.py +52 -45
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/abc/observer.py +49 -48
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/abc/periodicscheduler.py +50 -49
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/abc/scheduler.py +153 -151
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/abc/startable.py +14 -14
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/abc/subject.py +72 -72
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/disposable/__init__.py +19 -19
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/disposable/booleandisposable.py +20 -20
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/disposable/compositedisposable.py +103 -103
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/disposable/disposable.py +42 -43
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/disposable/multipleassignmentdisposable.py +48 -49
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/disposable/refcountdisposable.py +81 -82
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/disposable/scheduleddisposable.py +38 -38
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/disposable/serialdisposable.py +57 -58
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/disposable/singleassignmentdisposable.py +52 -53
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/internal/__init__.py +31 -24
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/internal/basic.py +36 -37
- reactivex-5.0.0a2/reactivex/internal/concurrency.py +27 -0
- reactivex-5.0.0a2/reactivex/internal/constants.py +4 -0
- reactivex-5.0.0a2/reactivex/internal/curry.py +59 -0
- reactivex-5.0.0a2/reactivex/internal/exceptions.py +31 -0
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/internal/priorityqueue.py +54 -54
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/internal/utils.py +62 -59
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/notification.py +206 -205
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/__init__.py +5 -5
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/amb.py +31 -32
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/case.py +34 -36
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/catch.py +84 -84
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/combinelatest.py +75 -76
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/concat.py +63 -62
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/connectableobservable.py +82 -80
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/defer.py +44 -43
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/empty.py +21 -22
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/forkjoin.py +72 -72
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/fromcallback.py +60 -59
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/fromfuture.py +49 -49
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/fromiterable.py +57 -56
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/generate.py +57 -57
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/generatewithrelativetime.py +90 -89
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/groupedobservable.py +40 -40
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/ifthen.py +56 -53
- reactivex-5.0.0a2/reactivex/observable/interval.py +10 -0
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/marbles.py +274 -276
- reactivex-5.0.0a2/reactivex/observable/merge.py +14 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/__init__.py +32 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/combination.py +481 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/conditional.py +135 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/error_handling.py +130 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/filtering.py +1119 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/mathematical.py +277 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/multicasting.py +306 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/testing.py +193 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/time_based.py +209 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/transformation.py +632 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/utility.py +811 -0
- reactivex-5.0.0a2/reactivex/observable/mixins/windowing.py +688 -0
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/never.py +23 -23
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/observable.py +397 -350
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/onerrorresumenext.py +74 -69
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/range.py +70 -67
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/repeat.py +35 -35
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/returnvalue.py +65 -64
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/start.py +37 -37
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/startasync.py +19 -19
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/throw.py +25 -25
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/timer.py +134 -134
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/toasync.py +55 -54
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/using.py +54 -53
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/withlatestfrom.py +58 -58
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observable/zip.py +91 -91
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observer/__init__.py +6 -6
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observer/autodetachobserver.py +65 -65
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observer/observeonobserver.py +19 -19
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observer/observer.py +114 -115
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/observer/scheduledobserver.py +81 -81
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/operators/__init__.py +4348 -4305
- reactivex-5.0.0a2/reactivex/operators/_all.py +41 -0
- reactivex-5.0.0a2/reactivex/operators/_amb.py +105 -0
- reactivex-5.0.0a2/reactivex/operators/_asobservable.py +34 -0
- reactivex-5.0.0a2/reactivex/operators/_average.py +65 -0
- reactivex-5.0.0a2/reactivex/operators/_buffer.py +126 -0
- reactivex-5.0.0a2/reactivex/operators/_bufferwithtime.py +44 -0
- reactivex-5.0.0a2/reactivex/operators/_bufferwithtimeorcount.py +40 -0
- reactivex-5.0.0a2/reactivex/operators/_catch.py +79 -0
- reactivex-5.0.0a2/reactivex/operators/_combinelatest.py +38 -0
- reactivex-5.0.0a2/reactivex/operators/_concat.py +29 -0
- reactivex-5.0.0a2/reactivex/operators/_contains.py +44 -0
- reactivex-5.0.0a2/reactivex/operators/_count.py +43 -0
- reactivex-5.0.0a2/reactivex/operators/_debounce.py +177 -0
- reactivex-5.0.0a2/reactivex/operators/_defaultifempty.py +55 -0
- reactivex-4.0.0a2/rx/core/operators/delay.py → reactivex-5.0.0a2/reactivex/operators/_delay.py +142 -140
- reactivex-5.0.0a2/reactivex/operators/_delaysubscription.py +40 -0
- reactivex-4.0.0a2/rx/core/operators/delaywithmapper.py → reactivex-5.0.0a2/reactivex/operators/_delaywithmapper.py +108 -109
- reactivex-5.0.0a2/reactivex/operators/_dematerialize.py +40 -0
- reactivex-5.0.0a2/reactivex/operators/_distinct.py +88 -0
- reactivex-5.0.0a2/reactivex/operators/_distinctuntilchanged.py +83 -0
- reactivex-4.0.0a2/rx/core/operators/do.py → reactivex-5.0.0a2/reactivex/operators/_do.py +335 -327
- reactivex-4.0.0a2/rx/core/operators/dowhile.py → reactivex-5.0.0a2/reactivex/operators/_dowhile.py +37 -36
- reactivex-5.0.0a2/reactivex/operators/_elementatordefault.py +75 -0
- reactivex-5.0.0a2/reactivex/operators/_exclusive.py +80 -0
- reactivex-5.0.0a2/reactivex/operators/_expand.py +107 -0
- reactivex-5.0.0a2/reactivex/operators/_filter.py +93 -0
- reactivex-4.0.0a2/rx/core/operators/finallyaction.py → reactivex-5.0.0a2/reactivex/operators/_finallyaction.py +51 -50
- reactivex-5.0.0a2/reactivex/operators/_find.py +63 -0
- reactivex-5.0.0a2/reactivex/operators/_first.py +47 -0
- reactivex-4.0.0a2/rx/core/operators/firstordefault.py → reactivex-5.0.0a2/reactivex/operators/_firstordefault.py +72 -71
- reactivex-5.0.0a2/reactivex/operators/_flatmap.py +135 -0
- reactivex-5.0.0a2/reactivex/operators/_forkjoin.py +33 -0
- reactivex-5.0.0a2/reactivex/operators/_groupby.py +51 -0
- reactivex-4.0.0a2/rx/core/operators/groupbyuntil.py → reactivex-5.0.0a2/reactivex/operators/_groupbyuntil.py +180 -170
- reactivex-4.0.0a2/rx/core/operators/groupjoin.py → reactivex-5.0.0a2/reactivex/operators/_groupjoin.py +179 -178
- reactivex-5.0.0a2/reactivex/operators/_ignoreelements.py +37 -0
- reactivex-5.0.0a2/reactivex/operators/_isempty.py +35 -0
- reactivex-4.0.0a2/rx/core/operators/join.py → reactivex-5.0.0a2/reactivex/operators/_join.py +145 -144
- reactivex-5.0.0a2/reactivex/operators/_last.py +49 -0
- reactivex-4.0.0a2/rx/core/operators/lastordefault.py → reactivex-5.0.0a2/reactivex/operators/_lastordefault.py +69 -68
- reactivex-5.0.0a2/reactivex/operators/_map.py +86 -0
- reactivex-5.0.0a2/reactivex/operators/_materialize.py +47 -0
- reactivex-5.0.0a2/reactivex/operators/_max.py +44 -0
- reactivex-4.0.0a2/rx/core/operators/maxby.py → reactivex-5.0.0a2/reactivex/operators/_maxby.py +40 -40
- reactivex-5.0.0a2/reactivex/operators/_merge.py +156 -0
- reactivex-5.0.0a2/reactivex/operators/_min.py +50 -0
- reactivex-4.0.0a2/rx/core/operators/minby.py → reactivex-5.0.0a2/reactivex/operators/_minby.py +92 -91
- reactivex-4.0.0a2/rx/core/operators/multicast.py → reactivex-5.0.0a2/reactivex/operators/_multicast.py +78 -75
- reactivex-5.0.0a2/reactivex/operators/_observeon.py +47 -0
- reactivex-4.0.0a2/rx/core/operators/onerrorresumenext.py → reactivex-5.0.0a2/reactivex/operators/_onerrorresumenext.py +19 -18
- reactivex-5.0.0a2/reactivex/operators/_pairwise.py +57 -0
- reactivex-5.0.0a2/reactivex/operators/_partition.py +95 -0
- reactivex-4.0.0a2/rx/core/operators/pluck.py → reactivex-5.0.0a2/reactivex/operators/_pluck.py +47 -46
- reactivex-5.0.0a2/reactivex/operators/_publish.py +81 -0
- reactivex-5.0.0a2/reactivex/operators/_publishvalue.py +33 -0
- reactivex-5.0.0a2/reactivex/operators/_reduce.py +55 -0
- reactivex-5.0.0a2/reactivex/operators/_repeat.py +45 -0
- reactivex-4.0.0a2/rx/core/operators/replay.py → reactivex-5.0.0a2/reactivex/operators/_replay.py +64 -63
- reactivex-4.0.0a2/rx/core/operators/retry.py → reactivex-5.0.0a2/reactivex/operators/_retry.py +43 -41
- reactivex-4.0.0a2/rx/core/operators/sample.py → reactivex-5.0.0a2/reactivex/operators/_sample.py +84 -78
- reactivex-5.0.0a2/reactivex/operators/_scan.py +62 -0
- reactivex-4.0.0a2/rx/core/operators/sequenceequal.py → reactivex-5.0.0a2/reactivex/operators/_sequenceequal.py +125 -119
- reactivex-5.0.0a2/reactivex/operators/_single.py +46 -0
- reactivex-4.0.0a2/rx/core/operators/singleordefault.py → reactivex-5.0.0a2/reactivex/operators/_singleordefault.py +84 -83
- reactivex-5.0.0a2/reactivex/operators/_skip.py +53 -0
- reactivex-5.0.0a2/reactivex/operators/_skiplast.py +56 -0
- reactivex-4.0.0a2/rx/core/operators/skiplastwithtime.py → reactivex-5.0.0a2/reactivex/operators/_skiplastwithtime.py +70 -69
- reactivex-5.0.0a2/reactivex/operators/_skipuntil.py +77 -0
- reactivex-4.0.0a2/rx/core/operators/skipuntilwithtime.py → reactivex-5.0.0a2/reactivex/operators/_skipuntilwithtime.py +70 -69
- reactivex-5.0.0a2/reactivex/operators/_skipwhile.py +99 -0
- reactivex-5.0.0a2/reactivex/operators/_skipwithtime.py +70 -0
- reactivex-5.0.0a2/reactivex/operators/_slice.py +80 -0
- reactivex-5.0.0a2/reactivex/operators/_some.py +60 -0
- reactivex-5.0.0a2/reactivex/operators/_startswith.py +30 -0
- reactivex-5.0.0a2/reactivex/operators/_subscribeon.py +60 -0
- reactivex-5.0.0a2/reactivex/operators/_sum.py +37 -0
- reactivex-5.0.0a2/reactivex/operators/_switchlatest.py +92 -0
- reactivex-5.0.0a2/reactivex/operators/_take.py +57 -0
- reactivex-5.0.0a2/reactivex/operators/_takelast.py +56 -0
- reactivex-5.0.0a2/reactivex/operators/_takelastbuffer.py +56 -0
- reactivex-5.0.0a2/reactivex/operators/_takelastwithtime.py +72 -0
- reactivex-5.0.0a2/reactivex/operators/_takeuntil.py +52 -0
- reactivex-5.0.0a2/reactivex/operators/_takeuntilwithtime.py +56 -0
- reactivex-5.0.0a2/reactivex/operators/_takewhile.py +129 -0
- reactivex-5.0.0a2/reactivex/operators/_takewithtime.py +58 -0
- reactivex-5.0.0a2/reactivex/operators/_throttlefirst.py +64 -0
- reactivex-5.0.0a2/reactivex/operators/_timeinterval.py +57 -0
- reactivex-5.0.0a2/reactivex/operators/_timeout.py +103 -0
- reactivex-4.0.0a2/rx/core/operators/timeoutwithmapper.py → reactivex-5.0.0a2/reactivex/operators/_timeoutwithmapper.py +135 -130
- reactivex-5.0.0a2/reactivex/operators/_timestamp.py +51 -0
- reactivex-5.0.0a2/reactivex/operators/_todict.py +72 -0
- reactivex-4.0.0a2/rx/core/operators/tofuture.py → reactivex-5.0.0a2/reactivex/operators/_tofuture.py +76 -67
- reactivex-5.0.0a2/reactivex/operators/_toiterable.py +50 -0
- reactivex-4.0.0a2/rx/core/operators/tomarbles.py → reactivex-5.0.0a2/reactivex/operators/_tomarbles.py +78 -78
- reactivex-5.0.0a2/reactivex/operators/_toset.py +47 -0
- reactivex-4.0.0a2/rx/core/operators/whiledo.py → reactivex-5.0.0a2/reactivex/operators/_whiledo.py +39 -38
- reactivex-5.0.0a2/reactivex/operators/_window.py +178 -0
- reactivex-5.0.0a2/reactivex/operators/_windowwithcount.py +94 -0
- reactivex-5.0.0a2/reactivex/operators/_windowwithtime.py +137 -0
- reactivex-5.0.0a2/reactivex/operators/_windowwithtimeorcount.py +112 -0
- reactivex-4.0.0a2/rx/core/operators/withlatestfrom.py → reactivex-5.0.0a2/reactivex/operators/_withlatestfrom.py +36 -32
- reactivex-5.0.0a2/reactivex/operators/_zip.py +87 -0
- reactivex-4.0.0a2/rx/core/operators/connectable/refcount.py → reactivex-5.0.0a2/reactivex/operators/connectable/_refcount.py +47 -46
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/pipe.py +204 -213
- {reactivex-4.0.0a2/rx/core → reactivex-5.0.0a2/reactivex}/run.py +73 -69
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/__init__.py +25 -25
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/catchscheduler.py +178 -177
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/currentthreadscheduler.py +80 -81
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/eventloop/__init__.py +15 -15
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/eventloop/asyncioscheduler.py +124 -119
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/eventloop/asynciothreadsafescheduler.py +155 -153
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/eventloop/eventletscheduler.py +126 -122
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/eventloop/geventscheduler.py +127 -123
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/eventloop/ioloopscheduler.py +132 -128
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/eventloop/twistedscheduler.py +113 -109
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/eventloopscheduler.py +215 -218
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/historicalscheduler.py +19 -20
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/immediatescheduler.py +97 -96
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/mainloop/__init__.py +13 -13
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/mainloop/gtkscheduler.py +143 -138
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/mainloop/pygamescheduler.py +113 -113
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/mainloop/qtscheduler.py +143 -140
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/mainloop/tkinterscheduler.py +98 -94
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/mainloop/wxscheduler.py +177 -159
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/newthreadscheduler.py +134 -136
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/periodicscheduler.py +60 -60
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/scheduleditem.py +47 -49
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/scheduler.py +172 -172
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/threadpoolscheduler.py +37 -35
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/timeoutscheduler.py +123 -118
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/trampoline.py +61 -62
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/trampolinescheduler.py +116 -114
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/scheduler/virtualtimescheduler.py +251 -250
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/subject/__init__.py +6 -6
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/subject/asyncsubject.py +85 -86
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/subject/behaviorsubject.py +69 -70
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/subject/innersubscription.py +26 -26
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/subject/replaysubject.py +141 -139
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/subject/subject.py +110 -109
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/__init__.py +14 -14
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/coldobservable.py +57 -57
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/hotobservable.py +61 -61
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/marbles.py +198 -195
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/mockdisposable.py +12 -14
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/mockobserver.py +24 -24
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/reactivetest.py +84 -82
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/recorded.py +41 -41
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/subscription.py +25 -25
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/testing/testscheduler.py +165 -159
- reactivex-5.0.0a2/reactivex/typing.py +68 -0
- reactivex-4.0.0a2/PKG-INFO +0 -147
- reactivex-4.0.0a2/README.rst +0 -121
- reactivex-4.0.0a2/pyproject.toml +0 -81
- reactivex-4.0.0a2/rx/_version.py +0 -2
- reactivex-4.0.0a2/rx/core/__init__.py +0 -16
- reactivex-4.0.0a2/rx/core/observable/interval.py +0 -14
- reactivex-4.0.0a2/rx/core/observable/merge.py +0 -14
- reactivex-4.0.0a2/rx/core/operators/all.py +0 -24
- reactivex-4.0.0a2/rx/core/operators/amb.py +0 -93
- reactivex-4.0.0a2/rx/core/operators/asobservable.py +0 -31
- reactivex-4.0.0a2/rx/core/operators/average.py +0 -63
- reactivex-4.0.0a2/rx/core/operators/buffer.py +0 -80
- reactivex-4.0.0a2/rx/core/operators/bufferwithtime.py +0 -23
- reactivex-4.0.0a2/rx/core/operators/bufferwithtimeorcount.py +0 -20
- reactivex-4.0.0a2/rx/core/operators/catch.py +0 -76
- reactivex-4.0.0a2/rx/core/operators/combinelatest.py +0 -30
- reactivex-4.0.0a2/rx/core/operators/concat.py +0 -26
- reactivex-4.0.0a2/rx/core/operators/connectable/__init__.py +0 -0
- reactivex-4.0.0a2/rx/core/operators/contains.py +0 -24
- reactivex-4.0.0a2/rx/core/operators/count.py +0 -27
- reactivex-4.0.0a2/rx/core/operators/debounce.py +0 -174
- reactivex-4.0.0a2/rx/core/operators/defaultifempty.py +0 -52
- reactivex-4.0.0a2/rx/core/operators/delaysubscription.py +0 -37
- reactivex-4.0.0a2/rx/core/operators/dematerialize.py +0 -36
- reactivex-4.0.0a2/rx/core/operators/distinct.py +0 -83
- reactivex-4.0.0a2/rx/core/operators/distinctuntilchanged.py +0 -80
- reactivex-4.0.0a2/rx/core/operators/elementatordefault.py +0 -51
- reactivex-4.0.0a2/rx/core/operators/exclusive.py +0 -74
- reactivex-4.0.0a2/rx/core/operators/expand.py +0 -102
- reactivex-4.0.0a2/rx/core/operators/filter.py +0 -98
- reactivex-4.0.0a2/rx/core/operators/find.py +0 -46
- reactivex-4.0.0a2/rx/core/operators/first.py +0 -40
- reactivex-4.0.0a2/rx/core/operators/flatmap.py +0 -129
- reactivex-4.0.0a2/rx/core/operators/forkjoin.py +0 -28
- reactivex-4.0.0a2/rx/core/operators/groupby.py +0 -30
- reactivex-4.0.0a2/rx/core/operators/ignoreelements.py +0 -32
- reactivex-4.0.0a2/rx/core/operators/isempty.py +0 -24
- reactivex-4.0.0a2/rx/core/operators/last.py +0 -45
- reactivex-4.0.0a2/rx/core/operators/map.py +0 -71
- reactivex-4.0.0a2/rx/core/operators/materialize.py +0 -48
- reactivex-4.0.0a2/rx/core/operators/max.py +0 -37
- reactivex-4.0.0a2/rx/core/operators/merge.py +0 -154
- reactivex-4.0.0a2/rx/core/operators/min.py +0 -44
- reactivex-4.0.0a2/rx/core/operators/observeon.py +0 -43
- reactivex-4.0.0a2/rx/core/operators/pairwise.py +0 -53
- reactivex-4.0.0a2/rx/core/operators/partition.py +0 -88
- reactivex-4.0.0a2/rx/core/operators/publish.py +0 -66
- reactivex-4.0.0a2/rx/core/operators/publishvalue.py +0 -29
- reactivex-4.0.0a2/rx/core/operators/reduce.py +0 -51
- reactivex-4.0.0a2/rx/core/operators/repeat.py +0 -44
- reactivex-4.0.0a2/rx/core/operators/scan.py +0 -61
- reactivex-4.0.0a2/rx/core/operators/single.py +0 -36
- reactivex-4.0.0a2/rx/core/operators/skip.py +0 -50
- reactivex-4.0.0a2/rx/core/operators/skiplast.py +0 -52
- reactivex-4.0.0a2/rx/core/operators/skipuntil.py +0 -73
- reactivex-4.0.0a2/rx/core/operators/skipwhile.py +0 -77
- reactivex-4.0.0a2/rx/core/operators/skipwithtime.py +0 -66
- reactivex-4.0.0a2/rx/core/operators/slice.py +0 -75
- reactivex-4.0.0a2/rx/core/operators/some.py +0 -59
- reactivex-4.0.0a2/rx/core/operators/startswith.py +0 -28
- reactivex-4.0.0a2/rx/core/operators/subscribeon.py +0 -57
- reactivex-4.0.0a2/rx/core/operators/sum.py +0 -20
- reactivex-4.0.0a2/rx/core/operators/switchlatest.py +0 -91
- reactivex-4.0.0a2/rx/core/operators/take.py +0 -54
- reactivex-4.0.0a2/rx/core/operators/takelast.py +0 -55
- reactivex-4.0.0a2/rx/core/operators/takelastbuffer.py +0 -55
- reactivex-4.0.0a2/rx/core/operators/takelastwithtime.py +0 -68
- reactivex-4.0.0a2/rx/core/operators/takeuntil.py +0 -52
- reactivex-4.0.0a2/rx/core/operators/takeuntilwithtime.py +0 -53
- reactivex-4.0.0a2/rx/core/operators/takewhile.py +0 -121
- reactivex-4.0.0a2/rx/core/operators/takewithtime.py +0 -53
- reactivex-4.0.0a2/rx/core/operators/throttlefirst.py +0 -57
- reactivex-4.0.0a2/rx/core/operators/timeinterval.py +0 -53
- reactivex-4.0.0a2/rx/core/operators/timeout.py +0 -102
- reactivex-4.0.0a2/rx/core/operators/timestamp.py +0 -50
- reactivex-4.0.0a2/rx/core/operators/todict.py +0 -64
- reactivex-4.0.0a2/rx/core/operators/toiterable.py +0 -44
- reactivex-4.0.0a2/rx/core/operators/toset.py +0 -37
- reactivex-4.0.0a2/rx/core/operators/window.py +0 -179
- reactivex-4.0.0a2/rx/core/operators/windowwithcount.py +0 -93
- reactivex-4.0.0a2/rx/core/operators/windowwithtime.py +0 -118
- reactivex-4.0.0a2/rx/core/operators/windowwithtimeorcount.py +0 -96
- reactivex-4.0.0a2/rx/core/operators/zip.py +0 -84
- reactivex-4.0.0a2/rx/core/typing.py +0 -57
- reactivex-4.0.0a2/rx/internal/concurrency.py +0 -21
- reactivex-4.0.0a2/rx/internal/constants.py +0 -4
- reactivex-4.0.0a2/rx/internal/exceptions.py +0 -38
- reactivex-4.0.0a2/setup.py +0 -43
- {reactivex-4.0.0a2/rx/core/operators → reactivex-5.0.0a2/reactivex/operators/connectable}/__init__.py +0 -0
- {reactivex-4.0.0a2/rx → reactivex-5.0.0a2/reactivex}/py.typed +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
*.py[cod]
|
|
2
|
+
|
|
3
|
+
# C extensions
|
|
4
|
+
*.so
|
|
5
|
+
|
|
6
|
+
# Packages
|
|
7
|
+
*.egg
|
|
8
|
+
*.egg-info
|
|
9
|
+
dist
|
|
10
|
+
build
|
|
11
|
+
eggs
|
|
12
|
+
.eggs
|
|
13
|
+
parts
|
|
14
|
+
bin
|
|
15
|
+
var
|
|
16
|
+
sdist
|
|
17
|
+
develop-eggs
|
|
18
|
+
.installed.cfg
|
|
19
|
+
lib
|
|
20
|
+
lib64
|
|
21
|
+
*tmp_dir
|
|
22
|
+
|
|
23
|
+
# Installer logs
|
|
24
|
+
pip-log.txt
|
|
25
|
+
|
|
26
|
+
# Unit test / coverage reports
|
|
27
|
+
.coverage
|
|
28
|
+
.tox
|
|
29
|
+
nosetests.xml
|
|
30
|
+
coverage.xml
|
|
31
|
+
htmlcov
|
|
32
|
+
.mypy_cache
|
|
33
|
+
.pytest_cache
|
|
34
|
+
|
|
35
|
+
# Virtual env
|
|
36
|
+
venv
|
|
37
|
+
|
|
38
|
+
# Translations
|
|
39
|
+
*.mo
|
|
40
|
+
|
|
41
|
+
# Mr Developer
|
|
42
|
+
.mr.developer.cfg
|
|
43
|
+
.project
|
|
44
|
+
.pydevproject
|
|
45
|
+
|
|
46
|
+
# Visual studio
|
|
47
|
+
*.suo
|
|
48
|
+
*.DotSettings.user
|
|
49
|
+
TestResults/
|
|
50
|
+
|
|
51
|
+
# Log files
|
|
52
|
+
*.log
|
|
53
|
+
Rx.pyperf
|
|
54
|
+
*.coverage
|
|
55
|
+
UpgradeLog.htm
|
|
56
|
+
TestResults/Rx.TE.Tests.mdf
|
|
57
|
+
TestResults/Rx.TE.Tests_log.ldf
|
|
58
|
+
*.user
|
|
59
|
+
|
|
60
|
+
# Cloud9
|
|
61
|
+
.c9
|
|
62
|
+
|
|
63
|
+
# PyCharm
|
|
64
|
+
.idea
|
|
65
|
+
.zedstate
|
|
66
|
+
|
|
67
|
+
# Spyder IDE
|
|
68
|
+
.spyproject/
|
|
69
|
+
|
|
70
|
+
.ipynb_checkpoints
|
|
71
|
+
.cache/
|
|
72
|
+
.vscode/
|
|
73
|
+
.noseids
|
|
74
|
+
_build
|
|
75
|
+
|
|
76
|
+
# Mac OS
|
|
77
|
+
.DS_Store
|
|
78
|
+
|
|
79
|
+
# Type checkers
|
|
80
|
+
.pyre
|
|
81
|
+
|
|
82
|
+
.ionide/
|
|
83
|
+
|
|
84
|
+
.python-version
|
|
85
|
+
__pycache__
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
# The MIT License
|
|
2
|
-
|
|
3
|
-
Copyright 2013-2022, Dag Brattli, Microsoft Corp., and Contributors.
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
# The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright 2013-2022, Dag Brattli, Microsoft Corp., and Contributors.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: reactivex
|
|
3
|
+
Version: 5.0.0a2
|
|
4
|
+
Summary: ReactiveX (Rx) for Python
|
|
5
|
+
Project-URL: Homepage, http://reactivex.io
|
|
6
|
+
Project-URL: Repository, https://github.com/ReactiveX/RxPY
|
|
7
|
+
Project-URL: Documentation, https://rxpy.readthedocs.io/en/latest/
|
|
8
|
+
Author-email: Dag Brattli <dag@brattli.net>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
12
|
+
Classifier: Environment :: Other Environment
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: <4.0,>=3.10
|
|
25
|
+
Requires-Dist: typing-extensions<5,>=4.15.0
|
|
26
|
+
Description-Content-Type: text/x-rst
|
|
27
|
+
|
|
28
|
+
===============================
|
|
29
|
+
The ReactiveX for Python (RxPY)
|
|
30
|
+
===============================
|
|
31
|
+
|
|
32
|
+
.. image:: https://github.com/ReactiveX/RxPY/workflows/Python%20package/badge.svg
|
|
33
|
+
:target: https://github.com/ReactiveX/RxPY/actions
|
|
34
|
+
:alt: Build Status
|
|
35
|
+
|
|
36
|
+
.. image:: https://img.shields.io/coveralls/ReactiveX/RxPY.svg
|
|
37
|
+
:target: https://coveralls.io/github/ReactiveX/RxPY
|
|
38
|
+
:alt: Coverage Status
|
|
39
|
+
|
|
40
|
+
.. image:: https://img.shields.io/pypi/v/reactivex.svg
|
|
41
|
+
:target: https://pypi.org/project/reactivex/
|
|
42
|
+
:alt: PyPY Package Version
|
|
43
|
+
|
|
44
|
+
.. image:: https://img.shields.io/readthedocs/rxpy.svg
|
|
45
|
+
:target: https://readthedocs.org/projects/rxpy/builds/
|
|
46
|
+
:alt: Documentation Status
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
*A library for composing asynchronous and event-based programs using observable
|
|
50
|
+
collections and query operator functions in Python*
|
|
51
|
+
|
|
52
|
+
ReactiveX for Python v4
|
|
53
|
+
-----------------------
|
|
54
|
+
|
|
55
|
+
For v3.X please go to the `v3 branch
|
|
56
|
+
<https://github.com/ReactiveX/RxPY/tree/release/v3.2.x>`_.
|
|
57
|
+
|
|
58
|
+
ReactiveX for Python v4.x runs on `Python <http://www.python.org/>`_ 3.9 or above. To
|
|
59
|
+
install:
|
|
60
|
+
|
|
61
|
+
.. code:: console
|
|
62
|
+
|
|
63
|
+
pip3 install reactivex
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
About ReactiveX
|
|
67
|
+
---------------
|
|
68
|
+
|
|
69
|
+
ReactiveX for Python (RxPY) is a library for composing asynchronous and event-based
|
|
70
|
+
programs using observable sequences and pipable query operators in Python. Using Rx,
|
|
71
|
+
developers represent asynchronous data streams with Observables, query asynchronous data
|
|
72
|
+
streams using operators, and parameterize concurrency in data/event streams using
|
|
73
|
+
Schedulers.
|
|
74
|
+
|
|
75
|
+
.. code:: python
|
|
76
|
+
|
|
77
|
+
import reactivex as rx
|
|
78
|
+
from reactivex import operators as ops
|
|
79
|
+
|
|
80
|
+
source = rx.of("Alpha", "Beta", "Gamma", "Delta", "Epsilon")
|
|
81
|
+
|
|
82
|
+
composed = source.pipe(
|
|
83
|
+
ops.map(lambda s: len(s)),
|
|
84
|
+
ops.filter(lambda i: i >= 5)
|
|
85
|
+
)
|
|
86
|
+
composed.subscribe(lambda value: print("Received {0}".format(value)))
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
Fluent and Functional Syntax
|
|
90
|
+
-----------------------------
|
|
91
|
+
|
|
92
|
+
RxPY supports both **fluent** (method chaining) and **functional** (pipe-based) syntax,
|
|
93
|
+
giving you the flexibility to choose the style that works best for your codebase:
|
|
94
|
+
|
|
95
|
+
**Fluent style** - Method chaining for a more Pythonic feel:
|
|
96
|
+
|
|
97
|
+
.. code:: python
|
|
98
|
+
|
|
99
|
+
import reactivex as rx
|
|
100
|
+
|
|
101
|
+
result = (rx.of(1, 2, 3, 4, 5)
|
|
102
|
+
.map(lambda x: x * 2)
|
|
103
|
+
.filter(lambda x: x > 5)
|
|
104
|
+
.reduce(lambda acc, x: acc + x, 0)
|
|
105
|
+
)
|
|
106
|
+
result.subscribe(print) # Output: 24
|
|
107
|
+
|
|
108
|
+
**Functional style** - Pipe-based for functional composition:
|
|
109
|
+
|
|
110
|
+
.. code:: python
|
|
111
|
+
|
|
112
|
+
import reactivex as rx
|
|
113
|
+
from reactivex import operators as ops
|
|
114
|
+
|
|
115
|
+
result = rx.of(1, 2, 3, 4, 5).pipe(
|
|
116
|
+
ops.map(lambda x: x * 2),
|
|
117
|
+
ops.filter(lambda x: x > 5),
|
|
118
|
+
ops.reduce(lambda acc, x: acc + x, 0)
|
|
119
|
+
)
|
|
120
|
+
result.subscribe(print) # Output: 24
|
|
121
|
+
|
|
122
|
+
Both styles are **fully supported** and can even be mixed in the same pipeline.
|
|
123
|
+
Choose the style that best fits your team's preferences and coding standards.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
Learning ReactiveX
|
|
127
|
+
------------------
|
|
128
|
+
|
|
129
|
+
Read the `documentation
|
|
130
|
+
<https://rxpy.readthedocs.io/en/latest/>`_ to learn
|
|
131
|
+
the principles of ReactiveX and get the complete reference of the available
|
|
132
|
+
operators.
|
|
133
|
+
|
|
134
|
+
If you need to migrate code from RxPY v1.x or v3.x, read the `migration
|
|
135
|
+
<https://rxpy.readthedocs.io/en/latest/migration.html>`_ section.
|
|
136
|
+
|
|
137
|
+
There is also a list of third party documentation available `here
|
|
138
|
+
<https://rxpy.readthedocs.io/en/latest/additional_reading.html>`_.
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
Community
|
|
142
|
+
----------
|
|
143
|
+
|
|
144
|
+
Join the conversation on GitHub `Discussions
|
|
145
|
+
<https://github.com/ReactiveX/RxPY/discussions>`_! if you have any questions or
|
|
146
|
+
suggestions.
|
|
147
|
+
|
|
148
|
+
Differences from .NET and RxJS
|
|
149
|
+
------------------------------
|
|
150
|
+
|
|
151
|
+
ReactiveX for Python is a fairly complete implementation of
|
|
152
|
+
`Rx <http://reactivex.io/>`_ with more than
|
|
153
|
+
`120 operators <https://rxpy.readthedocs.io/en/latest/operators.html>`_, and
|
|
154
|
+
over `1300 passing unit-tests <https://coveralls.io/github/ReactiveX/RxPY>`_. RxPY
|
|
155
|
+
is mostly a direct port of RxJS, but also borrows a bit from Rx.NET and RxJava in
|
|
156
|
+
terms of threading and blocking operators.
|
|
157
|
+
|
|
158
|
+
ReactiveX for Python follows `PEP 8 <http://legacy.python.org/dev/peps/pep-0008/>`_, so
|
|
159
|
+
all function and method names are ``snake_cased`` i.e lowercase with words separated by
|
|
160
|
+
underscores as necessary to improve readability.
|
|
161
|
+
|
|
162
|
+
Thus .NET code such as:
|
|
163
|
+
|
|
164
|
+
.. code:: c#
|
|
165
|
+
|
|
166
|
+
var group = source.GroupBy(i => i % 3);
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
need to be written with an ``_`` in Python:
|
|
170
|
+
|
|
171
|
+
.. code:: python
|
|
172
|
+
|
|
173
|
+
# Functional style
|
|
174
|
+
group = source.pipe(ops.group_by(lambda i: i % 3))
|
|
175
|
+
|
|
176
|
+
# Or fluent style
|
|
177
|
+
group = source.group_by(lambda i: i % 3)
|
|
178
|
+
|
|
179
|
+
With ReactiveX for Python you should use `named keyword arguments
|
|
180
|
+
<https://docs.python.org/3/glossary.html>`_ instead of positional arguments when an
|
|
181
|
+
operator has multiple optional arguments. RxPY will not try to detect which arguments
|
|
182
|
+
you are giving to the operator (or not).
|
|
183
|
+
|
|
184
|
+
Development
|
|
185
|
+
-----------
|
|
186
|
+
|
|
187
|
+
This project is managed using `uv <https://docs.astral.sh/uv/>`_. Code is formatted
|
|
188
|
+
using `Ruff <https://github.com/astral-sh/ruff>`_. Code is statically type checked
|
|
189
|
+
using `pyright <https://github.com/microsoft/pyright>`_.
|
|
190
|
+
|
|
191
|
+
After cloning the repository, install dependencies:
|
|
192
|
+
|
|
193
|
+
.. code:: console
|
|
194
|
+
|
|
195
|
+
uv sync
|
|
196
|
+
|
|
197
|
+
Run unit tests:
|
|
198
|
+
|
|
199
|
+
.. code:: console
|
|
200
|
+
|
|
201
|
+
uv run pytest
|
|
202
|
+
|
|
203
|
+
Run type checking:
|
|
204
|
+
|
|
205
|
+
.. code:: console
|
|
206
|
+
|
|
207
|
+
uv run pyright
|
|
208
|
+
|
|
209
|
+
Run code checks (manually):
|
|
210
|
+
|
|
211
|
+
.. code:: console
|
|
212
|
+
|
|
213
|
+
uv run pre-commit run --all-files
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
===============================
|
|
2
|
+
The ReactiveX for Python (RxPY)
|
|
3
|
+
===============================
|
|
4
|
+
|
|
5
|
+
.. image:: https://github.com/ReactiveX/RxPY/workflows/Python%20package/badge.svg
|
|
6
|
+
:target: https://github.com/ReactiveX/RxPY/actions
|
|
7
|
+
:alt: Build Status
|
|
8
|
+
|
|
9
|
+
.. image:: https://img.shields.io/coveralls/ReactiveX/RxPY.svg
|
|
10
|
+
:target: https://coveralls.io/github/ReactiveX/RxPY
|
|
11
|
+
:alt: Coverage Status
|
|
12
|
+
|
|
13
|
+
.. image:: https://img.shields.io/pypi/v/reactivex.svg
|
|
14
|
+
:target: https://pypi.org/project/reactivex/
|
|
15
|
+
:alt: PyPY Package Version
|
|
16
|
+
|
|
17
|
+
.. image:: https://img.shields.io/readthedocs/rxpy.svg
|
|
18
|
+
:target: https://readthedocs.org/projects/rxpy/builds/
|
|
19
|
+
:alt: Documentation Status
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
*A library for composing asynchronous and event-based programs using observable
|
|
23
|
+
collections and query operator functions in Python*
|
|
24
|
+
|
|
25
|
+
ReactiveX for Python v4
|
|
26
|
+
-----------------------
|
|
27
|
+
|
|
28
|
+
For v3.X please go to the `v3 branch
|
|
29
|
+
<https://github.com/ReactiveX/RxPY/tree/release/v3.2.x>`_.
|
|
30
|
+
|
|
31
|
+
ReactiveX for Python v4.x runs on `Python <http://www.python.org/>`_ 3.9 or above. To
|
|
32
|
+
install:
|
|
33
|
+
|
|
34
|
+
.. code:: console
|
|
35
|
+
|
|
36
|
+
pip3 install reactivex
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
About ReactiveX
|
|
40
|
+
---------------
|
|
41
|
+
|
|
42
|
+
ReactiveX for Python (RxPY) is a library for composing asynchronous and event-based
|
|
43
|
+
programs using observable sequences and pipable query operators in Python. Using Rx,
|
|
44
|
+
developers represent asynchronous data streams with Observables, query asynchronous data
|
|
45
|
+
streams using operators, and parameterize concurrency in data/event streams using
|
|
46
|
+
Schedulers.
|
|
47
|
+
|
|
48
|
+
.. code:: python
|
|
49
|
+
|
|
50
|
+
import reactivex as rx
|
|
51
|
+
from reactivex import operators as ops
|
|
52
|
+
|
|
53
|
+
source = rx.of("Alpha", "Beta", "Gamma", "Delta", "Epsilon")
|
|
54
|
+
|
|
55
|
+
composed = source.pipe(
|
|
56
|
+
ops.map(lambda s: len(s)),
|
|
57
|
+
ops.filter(lambda i: i >= 5)
|
|
58
|
+
)
|
|
59
|
+
composed.subscribe(lambda value: print("Received {0}".format(value)))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
Fluent and Functional Syntax
|
|
63
|
+
-----------------------------
|
|
64
|
+
|
|
65
|
+
RxPY supports both **fluent** (method chaining) and **functional** (pipe-based) syntax,
|
|
66
|
+
giving you the flexibility to choose the style that works best for your codebase:
|
|
67
|
+
|
|
68
|
+
**Fluent style** - Method chaining for a more Pythonic feel:
|
|
69
|
+
|
|
70
|
+
.. code:: python
|
|
71
|
+
|
|
72
|
+
import reactivex as rx
|
|
73
|
+
|
|
74
|
+
result = (rx.of(1, 2, 3, 4, 5)
|
|
75
|
+
.map(lambda x: x * 2)
|
|
76
|
+
.filter(lambda x: x > 5)
|
|
77
|
+
.reduce(lambda acc, x: acc + x, 0)
|
|
78
|
+
)
|
|
79
|
+
result.subscribe(print) # Output: 24
|
|
80
|
+
|
|
81
|
+
**Functional style** - Pipe-based for functional composition:
|
|
82
|
+
|
|
83
|
+
.. code:: python
|
|
84
|
+
|
|
85
|
+
import reactivex as rx
|
|
86
|
+
from reactivex import operators as ops
|
|
87
|
+
|
|
88
|
+
result = rx.of(1, 2, 3, 4, 5).pipe(
|
|
89
|
+
ops.map(lambda x: x * 2),
|
|
90
|
+
ops.filter(lambda x: x > 5),
|
|
91
|
+
ops.reduce(lambda acc, x: acc + x, 0)
|
|
92
|
+
)
|
|
93
|
+
result.subscribe(print) # Output: 24
|
|
94
|
+
|
|
95
|
+
Both styles are **fully supported** and can even be mixed in the same pipeline.
|
|
96
|
+
Choose the style that best fits your team's preferences and coding standards.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Learning ReactiveX
|
|
100
|
+
------------------
|
|
101
|
+
|
|
102
|
+
Read the `documentation
|
|
103
|
+
<https://rxpy.readthedocs.io/en/latest/>`_ to learn
|
|
104
|
+
the principles of ReactiveX and get the complete reference of the available
|
|
105
|
+
operators.
|
|
106
|
+
|
|
107
|
+
If you need to migrate code from RxPY v1.x or v3.x, read the `migration
|
|
108
|
+
<https://rxpy.readthedocs.io/en/latest/migration.html>`_ section.
|
|
109
|
+
|
|
110
|
+
There is also a list of third party documentation available `here
|
|
111
|
+
<https://rxpy.readthedocs.io/en/latest/additional_reading.html>`_.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
Community
|
|
115
|
+
----------
|
|
116
|
+
|
|
117
|
+
Join the conversation on GitHub `Discussions
|
|
118
|
+
<https://github.com/ReactiveX/RxPY/discussions>`_! if you have any questions or
|
|
119
|
+
suggestions.
|
|
120
|
+
|
|
121
|
+
Differences from .NET and RxJS
|
|
122
|
+
------------------------------
|
|
123
|
+
|
|
124
|
+
ReactiveX for Python is a fairly complete implementation of
|
|
125
|
+
`Rx <http://reactivex.io/>`_ with more than
|
|
126
|
+
`120 operators <https://rxpy.readthedocs.io/en/latest/operators.html>`_, and
|
|
127
|
+
over `1300 passing unit-tests <https://coveralls.io/github/ReactiveX/RxPY>`_. RxPY
|
|
128
|
+
is mostly a direct port of RxJS, but also borrows a bit from Rx.NET and RxJava in
|
|
129
|
+
terms of threading and blocking operators.
|
|
130
|
+
|
|
131
|
+
ReactiveX for Python follows `PEP 8 <http://legacy.python.org/dev/peps/pep-0008/>`_, so
|
|
132
|
+
all function and method names are ``snake_cased`` i.e lowercase with words separated by
|
|
133
|
+
underscores as necessary to improve readability.
|
|
134
|
+
|
|
135
|
+
Thus .NET code such as:
|
|
136
|
+
|
|
137
|
+
.. code:: c#
|
|
138
|
+
|
|
139
|
+
var group = source.GroupBy(i => i % 3);
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
need to be written with an ``_`` in Python:
|
|
143
|
+
|
|
144
|
+
.. code:: python
|
|
145
|
+
|
|
146
|
+
# Functional style
|
|
147
|
+
group = source.pipe(ops.group_by(lambda i: i % 3))
|
|
148
|
+
|
|
149
|
+
# Or fluent style
|
|
150
|
+
group = source.group_by(lambda i: i % 3)
|
|
151
|
+
|
|
152
|
+
With ReactiveX for Python you should use `named keyword arguments
|
|
153
|
+
<https://docs.python.org/3/glossary.html>`_ instead of positional arguments when an
|
|
154
|
+
operator has multiple optional arguments. RxPY will not try to detect which arguments
|
|
155
|
+
you are giving to the operator (or not).
|
|
156
|
+
|
|
157
|
+
Development
|
|
158
|
+
-----------
|
|
159
|
+
|
|
160
|
+
This project is managed using `uv <https://docs.astral.sh/uv/>`_. Code is formatted
|
|
161
|
+
using `Ruff <https://github.com/astral-sh/ruff>`_. Code is statically type checked
|
|
162
|
+
using `pyright <https://github.com/microsoft/pyright>`_.
|
|
163
|
+
|
|
164
|
+
After cloning the repository, install dependencies:
|
|
165
|
+
|
|
166
|
+
.. code:: console
|
|
167
|
+
|
|
168
|
+
uv sync
|
|
169
|
+
|
|
170
|
+
Run unit tests:
|
|
171
|
+
|
|
172
|
+
.. code:: console
|
|
173
|
+
|
|
174
|
+
uv run pytest
|
|
175
|
+
|
|
176
|
+
Run type checking:
|
|
177
|
+
|
|
178
|
+
.. code:: console
|
|
179
|
+
|
|
180
|
+
uv run pyright
|
|
181
|
+
|
|
182
|
+
Run code checks (manually):
|
|
183
|
+
|
|
184
|
+
.. code:: console
|
|
185
|
+
|
|
186
|
+
uv run pre-commit run --all-files
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "reactivex"
|
|
3
|
+
version = "5.0.0a2"
|
|
4
|
+
description = "ReactiveX (Rx) for Python"
|
|
5
|
+
authors = [{ name = "Dag Brattli", email = "dag@brattli.net" }]
|
|
6
|
+
requires-python = ">= 3.10, < 4.0"
|
|
7
|
+
readme = "README.rst"
|
|
8
|
+
license = "MIT"
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Development Status :: 5 - Production/Stable",
|
|
11
|
+
"Environment :: Other Environment",
|
|
12
|
+
"Intended Audience :: Developers",
|
|
13
|
+
"License :: OSI Approved :: MIT License",
|
|
14
|
+
"Operating System :: OS Independent",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Programming Language :: Python :: 3.10",
|
|
17
|
+
"Programming Language :: Python :: 3.11",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Programming Language :: Python :: 3.14",
|
|
21
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
22
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
23
|
+
]
|
|
24
|
+
dependencies = ["typing-extensions>=4.15.0,<5"]
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "http://reactivex.io"
|
|
28
|
+
Repository = "https://github.com/ReactiveX/RxPY"
|
|
29
|
+
Documentation = "https://rxpy.readthedocs.io/en/latest/"
|
|
30
|
+
|
|
31
|
+
[dependency-groups]
|
|
32
|
+
test = [
|
|
33
|
+
"pyyaml>=6.0.3,<7",
|
|
34
|
+
"pytest-asyncio>=1.2.0,<1.3.0",
|
|
35
|
+
"pytest>=8.4.1,<9",
|
|
36
|
+
"coverage>=6.3.2,<7",
|
|
37
|
+
"pytest-xdist>=3.8.0,<4",
|
|
38
|
+
"ruff>=0.14.0,<1",
|
|
39
|
+
"pyright>=1.1.407,<1.2.0",
|
|
40
|
+
"mypy>=1.18.2,<1.19.0",
|
|
41
|
+
"coveralls>=4.0.2,<5",
|
|
42
|
+
"pre-commit>=4.3.0,<5",
|
|
43
|
+
"dunamai>=1.25.0,<2",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[tool.uv]
|
|
47
|
+
default-groups = ["test"]
|
|
48
|
+
|
|
49
|
+
[tool.hatch.build.targets.sdist]
|
|
50
|
+
include = [
|
|
51
|
+
"reactivex",
|
|
52
|
+
"reactivex/py.typed",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
[tool.hatch.build.targets.wheel]
|
|
56
|
+
include = [
|
|
57
|
+
"reactivex",
|
|
58
|
+
"reactivex/py.typed",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[build-system]
|
|
62
|
+
requires = ["hatchling"]
|
|
63
|
+
build-backend = "hatchling.build"
|
|
64
|
+
|
|
65
|
+
[tool.ruff]
|
|
66
|
+
line-length = 88
|
|
67
|
+
target-version = "5.0.0a2"
|
|
68
|
+
exclude = [
|
|
69
|
+
".git",
|
|
70
|
+
"__pycache__",
|
|
71
|
+
"docs/source/conf.py",
|
|
72
|
+
"old",
|
|
73
|
+
"build",
|
|
74
|
+
"dist",
|
|
75
|
+
"notebooks",
|
|
76
|
+
"examples",
|
|
77
|
+
# Test directories - remove as each stage is completed
|
|
78
|
+
# Stage 1 complete, Stage 2 partial (test_integration complete)
|
|
79
|
+
"tests/test_subject",
|
|
80
|
+
"tests/test_scheduler",
|
|
81
|
+
"tests/test_observable",
|
|
82
|
+
]
|
|
83
|
+
|
|
84
|
+
[tool.ruff.lint]
|
|
85
|
+
select = [
|
|
86
|
+
"E", # pycodestyle errors
|
|
87
|
+
"W", # pycodestyle warnings
|
|
88
|
+
"F", # pyflakes
|
|
89
|
+
"I", # isort
|
|
90
|
+
"UP", # pyupgrade
|
|
91
|
+
]
|
|
92
|
+
|
|
93
|
+
[tool.ruff.lint.pydocstyle]
|
|
94
|
+
convention = "google"
|
|
95
|
+
|
|
96
|
+
[tool.ruff.lint.isort]
|
|
97
|
+
known-first-party = ["reactivex"]
|
|
98
|
+
|
|
99
|
+
[tool.mypy]
|
|
100
|
+
python_version = "5.0.0a2"
|
|
101
|
+
follow_imports = "silent"
|
|
102
|
+
files = ["reactivex"]
|
|
103
|
+
disallow_any_generics = true
|
|
104
|
+
disallow_untyped_defs = true
|
|
105
|
+
|
|
106
|
+
[tool.pytest.ini_options]
|
|
107
|
+
testpaths = ["tests"]
|
|
108
|
+
asyncio_mode = "strict"
|
|
109
|
+
|
|
110
|
+
[tool.pyright]
|
|
111
|
+
include = ["reactivex", "tests"]
|
|
112
|
+
exclude = [
|
|
113
|
+
# Stage 1 complete, Stage 2 partial (test_integration complete)
|
|
114
|
+
"tests/test_subject",
|
|
115
|
+
"tests/test_scheduler",
|
|
116
|
+
"tests/test_observable",
|
|
117
|
+
]
|
|
118
|
+
reportImportCycles = false
|
|
119
|
+
reportMissingImports = false
|
|
120
|
+
pythonVersion = "3.10"
|
|
121
|
+
typeCheckingMode = "strict"
|