reactivex


Namereactivex JSON
Version 4.0.4 PyPI version JSON
download
home_pagehttp://reactivex.io
SummaryReactiveX (Rx) for Python
upload_time2022-07-16 07:11:53
maintainer
docs_urlNone
authorDag Brattli
requires_python>=3.7,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===============================
The ReactiveX for Python (RxPY)
===============================

.. image:: https://github.com/ReactiveX/RxPY/workflows/Python%20package/badge.svg
    :target: https://github.com/ReactiveX/RxPY/actions
    :alt: Build Status

.. image:: https://img.shields.io/coveralls/ReactiveX/RxPY.svg
    :target: https://coveralls.io/github/ReactiveX/RxPY
    :alt: Coverage Status

.. image:: https://img.shields.io/pypi/v/reactivex.svg
    :target: https://pypi.org/project/reactivex/
    :alt: PyPY Package Version

.. image:: https://img.shields.io/readthedocs/rxpy.svg
    :target: https://readthedocs.org/projects/rxpy/builds/
    :alt: Documentation Status


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

ReactiveX for Python v4
-----------------------

For v3.X please go to the `v3 branch
<https://github.com/ReactiveX/RxPY/tree/release/v3.2.x>`_.

ReactiveX for Python v4.x runs on `Python <http://www.python.org/>`_ 3.7 or above. To
install:

.. code:: console

    pip3 install reactivex


About ReactiveX
---------------

ReactiveX for Python (RxPY) is a library 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.

.. code:: python

    import reactivex as rx
    from reactivex import operators as ops

    source = rx.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 ReactiveX
------------------

Read the `documentation
<https://rxpy.readthedocs.io/en/latest/>`_ to learn
the principles of ReactiveX and get the complete reference of the available
operators.

If you need to migrate code from RxPY v1.x or v3.x, read the `migration
<https://rxpy.readthedocs.io/en/latest/migration.html>`_ section.

There is also a list of third party documentation available `here
<https://rxpy.readthedocs.io/en/latest/additional_reading.html>`_.


Community
----------

Join the conversation on GitHub `Discussions
<https://github.com/ReactiveX/RxPY/discussions>`_! if you have any questions or
suggestions.

Differences from .NET and RxJS
------------------------------

ReactiveX for Python is a fairly complete implementation of
`Rx <http://reactivex.io/>`_ with more than
`120 operators <https://rxpy.readthedocs.io/en/latest/operators.html>`_, and
over `1300 passing unit-tests <https://coveralls.io/github/ReactiveX/RxPY>`_. RxPY
is mostly a direct port of RxJS, but also borrows a bit from Rx.NET and RxJava in
terms of threading and blocking operators.

ReactiveX for Python follows `PEP 8 <http://legacy.python.org/dev/peps/pep-0008/>`_, so
all function and method names are ``snake_cased`` i.e lowercase with words separated by
underscores as necessary to improve readability.

Thus .NET code such as:

.. code:: c#

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


need to be written with an ``_`` in Python:

.. code:: python

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

With ReactiveX for Python you should use `named keyword arguments
<https://docs.python.org/3/glossary.html>`_ 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).

Development
-----------

This project is managed using `Poetry <https://python-poetry.org/>`_. Code is formatted
using `Black <https://github.com/psf/black>`_, `isort
<https://github.com/PyCQA/isort>`_. Code is statically type checked using `pyright
<https://github.com/microsoft/pyright>`_ and `mypy <http://mypy-lang.org/>`_.

If you want to take advantage of the default VSCode integration, then
first configure Poetry to make its virtual environment in the
repository:

.. code:: console

    poetry config virtualenvs.in-project true

After cloning the repository, activate the tooling:

.. code:: console

    poetry install
    poetry run pre-commit install

Run unit tests:

.. code:: console

    poetry run pytest

Run code checks (manually):

.. code:: console

    poetry run pre-commit run --all-files

            

Raw data

            {
    "_id": null,
    "home_page": "http://reactivex.io",
    "name": "reactivex",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Dag Brattli",
    "author_email": "dag@brattli.net",
    "download_url": "https://files.pythonhosted.org/packages/ef/63/f776322df4d7b456446eff78c4e64f14c3c26d57d46b4e06c18807d5d99c/reactivex-4.0.4.tar.gz",
    "platform": null,
    "description": "===============================\nThe ReactiveX for Python (RxPY)\n===============================\n\n.. image:: https://github.com/ReactiveX/RxPY/workflows/Python%20package/badge.svg\n    :target: https://github.com/ReactiveX/RxPY/actions\n    :alt: Build Status\n\n.. image:: https://img.shields.io/coveralls/ReactiveX/RxPY.svg\n    :target: https://coveralls.io/github/ReactiveX/RxPY\n    :alt: Coverage Status\n\n.. image:: https://img.shields.io/pypi/v/reactivex.svg\n    :target: https://pypi.org/project/reactivex/\n    :alt: PyPY Package Version\n\n.. image:: https://img.shields.io/readthedocs/rxpy.svg\n    :target: https://readthedocs.org/projects/rxpy/builds/\n    :alt: Documentation Status\n\n\n*A library for composing asynchronous and event-based programs using observable\ncollections and query operator functions in Python*\n\nReactiveX for Python v4\n-----------------------\n\nFor v3.X please go to the `v3 branch\n<https://github.com/ReactiveX/RxPY/tree/release/v3.2.x>`_.\n\nReactiveX for Python v4.x runs on `Python <http://www.python.org/>`_ 3.7 or above. To\ninstall:\n\n.. code:: console\n\n    pip3 install reactivex\n\n\nAbout ReactiveX\n---------------\n\nReactiveX for Python (RxPY) is a library for composing asynchronous and event-based\nprograms using observable sequences and pipable query operators in Python. Using Rx,\ndevelopers represent asynchronous data streams with Observables, query asynchronous data\nstreams using operators, and parameterize concurrency in data/event streams using\nSchedulers.\n\n.. code:: python\n\n    import reactivex as rx\n    from reactivex import operators as ops\n\n    source = rx.of(\"Alpha\", \"Beta\", \"Gamma\", \"Delta\", \"Epsilon\")\n\n    composed = source.pipe(\n        ops.map(lambda s: len(s)),\n        ops.filter(lambda i: i >= 5)\n    )\n    composed.subscribe(lambda value: print(\"Received {0}\".format(value)))\n\n\nLearning ReactiveX\n------------------\n\nRead the `documentation\n<https://rxpy.readthedocs.io/en/latest/>`_ to learn\nthe principles of ReactiveX and get the complete reference of the available\noperators.\n\nIf you need to migrate code from RxPY v1.x or v3.x, read the `migration\n<https://rxpy.readthedocs.io/en/latest/migration.html>`_ section.\n\nThere is also a list of third party documentation available `here\n<https://rxpy.readthedocs.io/en/latest/additional_reading.html>`_.\n\n\nCommunity\n----------\n\nJoin the conversation on GitHub `Discussions\n<https://github.com/ReactiveX/RxPY/discussions>`_! if you have any questions or\nsuggestions.\n\nDifferences from .NET and RxJS\n------------------------------\n\nReactiveX for Python is a fairly complete implementation of\n`Rx <http://reactivex.io/>`_ with more than\n`120 operators <https://rxpy.readthedocs.io/en/latest/operators.html>`_, and\nover `1300 passing unit-tests <https://coveralls.io/github/ReactiveX/RxPY>`_. RxPY\nis mostly a direct port of RxJS, but also borrows a bit from Rx.NET and RxJava in\nterms of threading and blocking operators.\n\nReactiveX for Python follows `PEP 8 <http://legacy.python.org/dev/peps/pep-0008/>`_, so\nall function and method names are ``snake_cased`` i.e lowercase with words separated by\nunderscores as necessary to improve readability.\n\nThus .NET code such as:\n\n.. code:: c#\n\n    var group = source.GroupBy(i => i % 3);\n\n\nneed to be written with an ``_`` in Python:\n\n.. code:: python\n\n    group = source.pipe(ops.group_by(lambda i: i % 3))\n\nWith ReactiveX for Python you should use `named keyword arguments\n<https://docs.python.org/3/glossary.html>`_ instead of positional arguments when an\noperator has multiple optional arguments. RxPY will not try to detect which arguments\nyou are giving to the operator (or not).\n\nDevelopment\n-----------\n\nThis project is managed using `Poetry <https://python-poetry.org/>`_. Code is formatted\nusing `Black <https://github.com/psf/black>`_, `isort\n<https://github.com/PyCQA/isort>`_. Code is statically type checked using `pyright\n<https://github.com/microsoft/pyright>`_ and `mypy <http://mypy-lang.org/>`_.\n\nIf you want to take advantage of the default VSCode integration, then\nfirst configure Poetry to make its virtual environment in the\nrepository:\n\n.. code:: console\n\n    poetry config virtualenvs.in-project true\n\nAfter cloning the repository, activate the tooling:\n\n.. code:: console\n\n    poetry install\n    poetry run pre-commit install\n\nRun unit tests:\n\n.. code:: console\n\n    poetry run pytest\n\nRun code checks (manually):\n\n.. code:: console\n\n    poetry run pre-commit run --all-files\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "ReactiveX (Rx) for Python",
    "version": "4.0.4",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "bc2ad86706ec7f3e171481a4adcd8665",
                "sha256": "0004796c420bd9e68aad8e65627d85a8e13f293de76656165dffbcb3a0e3fb6a"
            },
            "downloads": -1,
            "filename": "reactivex-4.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bc2ad86706ec7f3e171481a4adcd8665",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 217791,
            "upload_time": "2022-07-16T07:11:52",
            "upload_time_iso_8601": "2022-07-16T07:11:52.061763Z",
            "url": "https://files.pythonhosted.org/packages/69/3f/2ed8c1b8fe3fc2ed816ba40554ef703aad8c51700e2606c139fcf9b7f791/reactivex-4.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "04acdb9c89ce3a41e705661d2003b7b3",
                "sha256": "e912e6591022ab9176df8348a653fe8c8fa7a301f26f9931c9d8c78a650e04e8"
            },
            "downloads": -1,
            "filename": "reactivex-4.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "04acdb9c89ce3a41e705661d2003b7b3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 119177,
            "upload_time": "2022-07-16T07:11:53",
            "upload_time_iso_8601": "2022-07-16T07:11:53.689942Z",
            "url": "https://files.pythonhosted.org/packages/ef/63/f776322df4d7b456446eff78c4e64f14c3c26d57d46b4e06c18807d5d99c/reactivex-4.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-07-16 07:11:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "reactivex"
}
        
Elapsed time: 0.01873s