A library for lazy evaluation with context caching
Project description
lazily
A Python library for lazy evaluation with context caching.
Installation
pip install lazily
Example usage
from lazily import cell
@cell
def hello(ctx: dict) -> str:
return "Hello"
@cell
def world(ctx: dict) -> str:
return "World"
greeting = cell(lambda ctx: f"{hello(ctx)} {world(ctx)}!")
ctx = {}
greeting(ctx) # Hello World!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lazily-0.3.0.tar.gz
(10.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
lazily-0.3.0-py3-none-any.whl
(10.9 kB
view details)
File details
Details for the file lazily-0.3.0.tar.gz.
File metadata
- Download URL: lazily-0.3.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f14747fafb5a1fe9cd616fbe2d71dea0239c2eac26b1d184e5be1ca004b5c739
|
|
| MD5 |
6919170acf8cd3dca0b0265f5d2e13ba
|
|
| BLAKE2b-256 |
51c8e4c028130197dbb9745df9287ca0a9a2e8b6637674ae3f1bae7b4d32464f
|
File details
Details for the file lazily-0.3.0-py3-none-any.whl.
File metadata
- Download URL: lazily-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68ffd93693e72cfb6e27c8fbe542528c897be49acd04f8008e74e7111871e92a
|
|
| MD5 |
3520afa4119455f9b1b884de305d9ec0
|
|
| BLAKE2b-256 |
772afe4d870b2dfeb6e59d07f640a3cd0d17ca907416834f8bbd0dda8cb25e10
|