General
This package adds functionality useful for making ReactiveX powered ipywidgets.
Note that this package is in its Beta stage and may change interfaces slightly before a 1.0 release.
Installation
Run poetry add rxwidgets
Usage
import rxwidgets.ipython as rxi
@rxi.interact_manual
def b(a=(1,5)):
return a * 5
@rxi.interact
def c(b=b, c=(10, 20)):
c = b + c
print(f"C: {c}")
Corresponds roughly to native ipywidgets:
from ipywidgets import interact, interact_manual
@interact_manual
def b(a=(1,5)):
b = a * 5
@interact
def c(c=(10, 20)):
c = b + c
print(f"C: {c}")
An incomprehensive feature list is provided in the examples folder.
Streams
A function stream consists of these steps:
@rxi.stream_defaults- Convert parameter defaults into observables - may display ipywidgets.
- Convert function into a stream of its results from input streams.
- In stream: Curry the function and make wrap into a
ValueBox. - Object in stream:
ValueBox(partial(fn, ...))
@rxi.defer,@rxi.pre_load, ...- If desired, apply operators to the call-ready function
@rxi.apply- Create and display an
rxi.Screen. - In stream: Run the function inside the screen and return results as a
ValueBox. - Object in stream:
ValueBox(fn(...))
- Create and display an
@rxi.Automap- If desired, pack the final stream into an
Automapobject. This object maps all operators to operators applied inside the stream.
- If desired, pack the final stream into an
Metadata
Release files for rxwidgets 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rxwidgets-0.1.10.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rxwidgets-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.1 kB
Release files / rxwidgets-0.1.10.tar.gz
| Download URL | rxwidgets-0.1.10.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0911aa2bdcf39481850907fbf51d4b008520cdd789d2aafa4da130cdef5f90fe
|
|
BLAKE2b-256 checksum How to use checksums |
5074f3b9dd7bc4ba2c1994551427ed67adb892fd4189c70bf2a69939703e6abc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.8 CPython/3.8.10 Darwin/22.1.0
|
Release files / rxwidgets-0.1.10-py3-none-any.whl
| Download URL | rxwidgets-0.1.10-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
78e802c49dda8a478e131829efac73fe4101152adcf18c7543a35b75c121450e
|
|
BLAKE2b-256 checksum How to use checksums |
6b6e907e46f34ee6f2b5f811fe0693f2bc67f0794a36d5167c146b2a340f4664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.8 CPython/3.8.10 Darwin/22.1.0
|