{"id":16022561,"url":"https://github.com/mokeyish/pyiter","last_synced_at":"2025-03-17T15:30:31.576Z","repository":{"id":52081606,"uuid":"499723840","full_name":"mokeyish/pyiter","owner":"mokeyish","description":"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.","archived":false,"fork":false,"pushed_at":"2024-04-19T23:30:53.000Z","size":1703,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-22T12:17:16.512Z","etag":null,"topics":["chain-operation","functional-programming","linq","typing"],"latest_commit_sha":null,"homepage":"https://pyiter.yish.org/pyiter/sequence.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mokeyish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-04T04:27:00.000Z","updated_at":"2024-07-27T03:22:13.834Z","dependencies_parsed_at":"2024-07-27T03:22:12.754Z","dependency_job_id":"41df07ac-b3e7-41e3-b9f3-cf3a192ddb77","html_url":"https://github.com/mokeyish/pyiter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mokeyish%2Fpyiter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mokeyish%2Fpyiter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mokeyish%2Fpyiter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mokeyish%2Fpyiter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mokeyish","download_url":"https://codeload.github.com/mokeyish/pyiter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864822,"owners_count":20360360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chain-operation","functional-programming","linq","typing"],"created_at":"2024-10-08T18:40:40.409Z","updated_at":"2025-03-17T15:30:31.103Z","avatar_url":"https://github.com/mokeyish.png","language":"Python","readme":"# PyIter\n\n[![Pypi version](https://img.shields.io/pypi/v/pyiter?style=for-the-badge)](https://pypi.org/project/pyiter/)\n\nPyIter is a Python package for iterative operations inspired by the Kotlin、CSharp(linq)、TypeSrcipt and Rust .\nEnables strong **typing** and type inference for iterative operations.\n\n- Chain operations like map, reduce, filter, map\n- Lazy evaluation\n- parallel execution\n- strong **typing**\n\n## Install\n\n```bash\npip install pyiter\n```\n\n## Quickstart\n\n```python\nfrom pyiter import it\nfrom tqdm import tqdm\n\n\ntext = [\"hello\", \"world\"]\nit(text).map(str.upper).to_list()\n# ['HELLO', 'WORLD']\n\n\nwords = 'I dont want to believe I want to know'.split()\nit(words).group_by(lambda x: x).map(lambda g: (g.key, g.values.count())).to_list()\n# [('I', 2), ('dont', 1), ('want', 2), ('to', 2), ('believe', 1), ('know', 1)]\n\n\n# use tqdm\nit(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()\n\n```\n\n\n**Type inference**\n![.](https://github.com/mokeyish/pyiter/raw/main/screenshots/screenshot.png)\n\n## API\n\nSee [API](https://pyiter.yish.org/pyiter/sequence.html) documention.\n\n- You no need to read API documention. all functions are listed by the code completion as follows.\n  \n   ![.](https://github.com/mokeyish/pyiter/raw/main/screenshots/apilist.png)\n\n- All documentions are showed as follows.\n\n   ![.](https://github.com/mokeyish/pyiter/raw/main/screenshots/apidoc.png)\n\n## Similar libraries\n\nNote that none of the following libraries are providing full strong typing for code completion.\n\n- [Pyterator](https://github.com/remykarem/pyterator)\n- [PyFunctional](https://github.com/EntilZha/PyFunctional)\n- [fluent](https://github.com/dwt/fluent)\n- [Simple Smart Pipe](https://github.com/sspipe/sspipe)\n- [pyxtension](https://github.com/asuiu/pyxtension)\n\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttps://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmokeyish%2Fpyiter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmokeyish%2Fpyiter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmokeyish%2Fpyiter/lists"}