PyIter is a Python package for iterative operations inspired by the Kotlin、CSharp(linq)、TypeSrcipt and Rust . Enables strong typing and type inference for iterative operations.
Project description
PyIter
PyIter is a Python package for iterative operations inspired by the Kotlin、CSharp(linq)、TypeSrcipt and Rust . Enables strong typing and type inference for iterative operations.
- Chain operations like map, reduce, filter, map
- Lazy evaluation
- parallel execution
- strong typing
Install
pip install pyiter
Quickstart
from pyiter import iterate as it
from tqdm import tqdm
text = ["hello", "world"]
it(text).map(str.upper).to_list()
# ['HELLO', 'WORLD']
# use tqdm
it(range(10)).map(lambda x: str(x)).progress(lambda x: tqdm(x, total=x.len)).parallel_map(lambda x: x, max_workers=5).to_list()
Type inference
API
See API documention.
-
You no need to read api documention. all api functions are listed by the code completion as follows.
-
All documentions are showed as follows.
Similar libraries
Note that none of the following libraries are providing full strong typing for code completion.
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
pyiter-0.2.6.tar.gz
(12.0 kB
view hashes)
Built Distribution
pyiter-0.2.6-py3-none-any.whl
(11.3 kB
view hashes)