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
Built Distribution
File details
Details for the file pyiter-0.3.2.tar.gz
.
File metadata
- Download URL: pyiter-0.3.2.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 486017b0041cee7d7a153fcaa52d53c8180bbf70eee26c465c8db2e24b05930f |
|
MD5 | 0dafe66342e558e392bd16f642c6ad27 |
|
BLAKE2b-256 | 86960bac032e2d1d2aaa3d8ffbd703374ee1bc24547ce7f74475b33c54edad08 |
File details
Details for the file pyiter-0.3.2-py3-none-any.whl
.
File metadata
- Download URL: pyiter-0.3.2-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90543836fbb10473fe9565b4da00cc8111d85ba0f20d7114b91d765ef174149a |
|
MD5 | 7b6d47d3e8934197638225cc04e7f6db |
|
BLAKE2b-256 | c3963f991d317e66634cbc142695cac8b3d1ce2bde8816c5156ea734b77f3557 |