nr.refreshable
Provides the Refreshable class. A refreshable is a thread-safe container for a value that changes
over time. Refreshables can be subscribed to, to be notified when they are updated, and mapped to
compute new values and cache them as the parent gets updated.
Example
from nr.refreshable import Refreshable
root = Refreshable(42)
child = root.map(lambda n: n + 10)
assert child.get() == 52
root.update(100)
assert child.get() == 110
Copyright © 2021 Niklas Rosenstein
Release files for nr.refreshable 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nr.refreshable-0.0.2.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nr.refreshable-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / nr.refreshable-0.0.2.tar.gz
| Download URL | nr.refreshable-0.0.2.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2cb9c127c9b195463ceff0bc6f17f9a8c0841b740f6f347670428c985d0841e1
|
|
BLAKE2b-256 checksum How to use checksums |
038719f1fbdbceda43ec953d683066bf3d33e40ea1cbe7c664ae12daf37667dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
|
Release files / nr.refreshable-0.0.2-py3-none-any.whl
| Download URL | nr.refreshable-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bcf85b4ee7ca7b12b16159f0548e6fc1b7f6b0041c4f10572d7cd16a096e8d06
|
|
BLAKE2b-256 checksum How to use checksums |
408ac3ba359e1a00981a687a00f6dae7d5bac171e10ef47161b04724197226f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
|