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_bar(lambda x: tqdm(x, total=len(x))).parallel_map(lambda x: x, max_workers=5).to_list()
Type inference
API
See API docuumention.
-
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.1.5.tar.gz
(10.5 kB
view hashes)
Built Distribution
pyiter-0.1.5-py3-none-any.whl
(9.8 kB
view hashes)