@@ -10,8 +10,8 @@ The ReactiveX for Python (RxPY)
10
10
:target: https://coveralls.io/github/ReactiveX/RxPY
11
11
:alt: Coverage Status
12
12
13
- .. image :: https://img.shields.io/pypi/v/rx .svg
14
- :target: https://pypi.python. org/pypi/Rx
13
+ .. image :: https://img.shields.io/pypi/v/reactivex .svg
14
+ :target: https://pypi.org/project/reactivex/
15
15
:alt: PyPY Package Version
16
16
17
17
.. image :: https://img.shields.io/readthedocs/rxpy.svg
@@ -22,13 +22,14 @@ The ReactiveX for Python (RxPY)
22
22
*A library for composing asynchronous and event-based programs using observable
23
23
collections and query operator functions in Python *
24
24
25
- ReactiveX for Python (RxPY) v4.0
26
- --------------------------------
25
+ ReactiveX for Python v4
26
+ -----------------------
27
27
28
- For v3.X please go to the `v3 branch <https://github.com/ReactiveX/RxPY/tree/master >`_.
28
+ For v3.X please go to the `v3 branch
29
+ <https://github.com/ReactiveX/RxPY/tree/release/v3.2.x> `_.
29
30
30
- RxPY v4.x runs on `Python <http://www.python.org/ >`_ 3.7 or above. To install
31
- RxPY :
31
+ ReactiveX for Python v4.x runs on `Python <http://www.python.org/ >`_ 3.7 or above. To
32
+ install :
32
33
33
34
.. code :: console
34
35
@@ -46,10 +47,10 @@ streams using Schedulers.
46
47
47
48
.. code :: python
48
49
49
- import reactivex
50
+ import reactivex as rx
50
51
from reactivex import operators as ops
51
52
52
- source = reactivex .of(" Alpha" , " Beta" , " Gamma" , " Delta" , " Epsilon" )
53
+ source = rx .of(" Alpha" , " Beta" , " Gamma" , " Delta" , " Epsilon" )
53
54
54
55
composed = source.pipe(
55
56
ops.map(lambda s : len (s)),
@@ -63,7 +64,7 @@ Learning ReactiveX
63
64
64
65
Read the `documentation
65
66
<https://rxpy.readthedocs.io/en/latest/> `_ to learn
66
- the principles of RxPY and get the complete reference of the available
67
+ the principles of ReactiveX and get the complete reference of the available
67
68
operators.
68
69
69
70
If you need to migrate code from RxPY v1.x, read the `migration
@@ -98,8 +99,8 @@ over `1300 passing unit-tests <https://coveralls.io/github/ReactiveX/RxPY>`_. Rx
98
99
is mostly a direct port of RxJS, but also borrows a bit from Rx.NET and RxJava in
99
100
terms of threading and blocking operators.
100
101
101
- RxPY follows `PEP 8 <http://legacy.python.org/dev/peps/pep-0008/ >`_, so all
102
- function and method names are lowercase with words separated by underscores as
102
+ ReactiveX for Python follows `PEP 8 <http://legacy.python.org/dev/peps/pep-0008/ >`_, so
103
+ all function and method names are lowercase with words separated by underscores as
103
104
necessary to improve readability.
104
105
105
106
Thus .NET code such as:
@@ -115,7 +116,42 @@ need to be written with an ``_`` in Python:
115
116
116
117
group = source.pipe(ops.group_by(lambda i : i % 3 ))
117
118
118
- With RxPY you should use `named keyword arguments
119
- <https://docs.python.org/3/glossary.html> `_ instead of positional arguments when
120
- an operator has multiple optional arguments. RxPY will not try to detect which
121
- arguments you are giving to the operator (or not).
119
+ With ReactiveX for Python you should use `named keyword arguments
120
+ <https://docs.python.org/3/glossary.html> `_ instead of positional arguments when an
121
+ operator has multiple optional arguments. RxPY will not try to detect which arguments
122
+ you are giving to the operator (or not).
123
+
124
+ Development
125
+ -----------
126
+
127
+ This project is managed using `Poetry <https://python-poetry.org/ >`_. Code is formatted
128
+ using `Black <https://github.com/psf/black >`_, `isort
129
+ <https://github.com/PyCQA/isort> `_. Code is statically type checked using `pyright
130
+ <https://github.com/microsoft/pyright> `_ and `mypy <http://mypy-lang.org/ >`_.
131
+
132
+ If you want to take advantage of the default VSCode integration, then
133
+ first configure Poetry to make its virtual environment in the
134
+ repository:
135
+
136
+ .. code :: console
137
+
138
+ poetry config virtualenvs.in-project true
139
+
140
+ After cloning the repository, activate the tooling:
141
+
142
+ .. code :: console
143
+
144
+ poetry install
145
+ poetry run pre-commit install
146
+
147
+ Run unit tests:
148
+
149
+ .. code :: console
150
+
151
+ poetry run pytest
152
+
153
+ Run code checks (manually):
154
+
155
+ .. code :: console
156
+
157
+ poetry run pre-commit run --all-files
0 commit comments