Skip to main content

This repository renames the package references for RxPY3 from rx to rx3 so that you can install both rx and rx3 at the same time to ease with transitioning.

Simply use rx3 instead of rx wherever you’d normally import modules.

The Reactive Extensions for Python (RxPY)

https://img.shields.io/pypi/v/rxpy3.svg

A library for composing asynchronous and event-based programs using observable collections and query operator functions in Python

RxPY v3.0

For v1.X please go to the v1 branch.

RxPY v3.x runs on Python 3.6 or above. To install RxPY:

pip3 install rxpy3

About ReactiveX

Reactive Extensions for Python (RxPY) is a set of libraries for composing asynchronous and event-based programs using observable sequences and pipable query operators in Python. Using Rx, developers represent asynchronous data streams with Observables, query asynchronous data streams using operators, and parameterize concurrency in data/event streams using Schedulers.

import rx3
from rx3 import operators as ops

source = rx3.of("Alpha", "Beta", "Gamma", "Delta", "Epsilon")

composed = source.pipe(
    ops.map(lambda s: len(s)),
    ops.filter(lambda i: i >= 5)
)
composed.subscribe(lambda value: print("Received {0}".format(value)))

Learning RxPY

Read the documentation to learn the principles of RxPY and get the complete reference of the available operators.

I you need to migrate code from RxPY v1.x, read the migration section.

There is also a list of third party documentation available here.

Community

Join the conversation on Slack!

The gracious folks at PySlackers have given us a home in the #rxpy Slack channel. Please join us there for questions, conversations, and all things related to RxPy.

To join, navigate the page above to receive an email invite. After signing up, join us in the #rxpy channel.

Please follow the community guidelines and terms of service.

Differences from .NET and RxJS

RxPY is a fairly complete implementation of Rx with more than 120 operators, and over 1300 passing unit-tests. RxPY is mostly a direct port of RxJS, but also borrows a bit from RxNET and RxJava in terms of threading and blocking operators.

RxPY follows PEP 8, so all function and method names are lowercase with words separated by underscores as necessary to improve readability.

Thus .NET code such as:

var group = source.GroupBy(i => i % 3);

need to be written with an _ in Python:

group = source.pipe(ops.group_by(lambda i: i % 3))

With RxPY you should use named keyword arguments instead of positional arguments when an operator has multiple optional arguments. RxPY will not try to detect which arguments you are giving to the operator (or not).

Metadata

Release files for RxPy3 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RxPy3 1.0.2
File Size Uploaded
RxPy3-1.0.2.tar.gz 104.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for RxPy3 1.0.2
File Interpreter ABI Platform
RxPy3-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 300.3 kB

Release files / RxPy3-1.0.2.tar.gz

Download URL RxPy3-1.0.2.tar.gz
Size 104.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9d1aaa4b0b890235fae6c148168faf3c1dbe265439dff505ea13863a46f9e86d
BLAKE2b-256 checksum
How to use checksums
cdca122f3c2fa1e4a0f809e461e5d5d39d2000b80ba87534a971771bded9630d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.0

Release files / RxPy3-1.0.2-py3-none-any.whl

Download URL RxPy3-1.0.2-py3-none-any.whl
Size 196.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c69d88b7261808afd95f66e8a46a4d93c3f2c7261cba0c42d864f8425ea6c20b
BLAKE2b-256 checksum
How to use checksums
bc7605d927c389f60cba217b4259c13413f4df3ebbdf970e0cd5956ad7605a08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.0

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page