{"id":13507318,"url":"https://github.com/beatrichartz/parallel_stream","last_synced_at":"2025-04-04T16:16:44.684Z","repository":{"id":1767981,"uuid":"44451819","full_name":"beatrichartz/parallel_stream","owner":"beatrichartz","description":"A parallelized stream implementation for Elixir","archived":false,"fork":false,"pushed_at":"2022-09-17T04:31:11.000Z","size":81,"stargazers_count":100,"open_issues_count":2,"forks_count":19,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T12:58:01.439Z","etag":null,"topics":["elixir","parallelism","parallelize","stream"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beatrichartz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-17T19:48:04.000Z","updated_at":"2024-10-23T07:29:07.000Z","dependencies_parsed_at":"2022-08-08T22:30:13.073Z","dependency_job_id":null,"html_url":"https://github.com/beatrichartz/parallel_stream","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatrichartz%2Fparallel_stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatrichartz%2Fparallel_stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatrichartz%2Fparallel_stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatrichartz%2Fparallel_stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beatrichartz","download_url":"https://codeload.github.com/beatrichartz/parallel_stream/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208183,"owners_count":20901570,"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":["elixir","parallelism","parallelize","stream"],"created_at":"2024-08-01T02:00:31.021Z","updated_at":"2025-04-04T16:16:44.627Z","avatar_url":"https://github.com/beatrichartz.png","language":"Elixir","funding_links":[],"categories":["Algorithms and Data structures"],"sub_categories":[],"readme":"# ParallelStream [![Build Status](https://github.com/beatrichartz/csv/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/beatrichartz/parallel_stream) [![Coverage Status](https://coveralls.io/repos/github/beatrichartz/parallel_stream/badge.svg?branch=main)](https://coveralls.io/github/beatrichartz/parallel_stream?branch=main) [![Inline docs](http://inch-ci.org/github/beatrichartz/parallel_stream.svg?branch=main)](http://inch-ci.org/github/beatrichartz/parallel_stream) [![Hex pm](http://img.shields.io/hexpm/v/parallel_stream.svg?style=flat)](https://hex.pm/packages/parallel_stream) [![Downloads](https://img.shields.io/hexpm/dw/parallel_stream.svg?style=flat)](https://hex.pm/packages/parallel_stream)\nParallelized stream implementation for elixir\n\n## What does it do?\n\nParallelize some stream operations in Elixir whilst keeping your stream in order.\nOperates with a worker pool.\n\n## How do I get it?\n\nAdd\n```elixir\n{:parallel_stream, \"~\u003e 1.1.0\"}\n```\nto your deps in `mix.exs` like so:\n\n```elixir\ndefp deps do\n  [\n    {:parallel_stream, \"~\u003e 1.1.0\"}\n  ]\nend\n```\n\nNote: Elixir `1.5.0` is required\n\n## How to use\n\nDo this to parallelize a `map`:\n\n````elixir\nstream = 1..10 |\u003e ParallelStream.map(fn i -\u003e i * 2 end)\nstream |\u003e Enum.into([])\n[2,4,6,8,10,12,14,16,18,20]\n````\n\nThe generated stream is sorted the same as the input stream.\n\nMore supported functions are `each` (to produce side-effects):\n\n````elixir\n1..100 |\u003e ParallelStream.each(\u0026IO.inspect/1)\n````\n\n`filter`:\n\n````elixir\nstream = 1..20 |\u003e ParallelStream.filter(fn i -\u003e i |\u003e rem(2) == 0 end)\nstream |\u003e Enum.into([])\n[2,4,6,8,10,12,14,16,18,20]\n````\n\nand `filter`'s counterpart, `reject`:\n\n````elixir\nstream = 1..20 |\u003e ParallelStream.reject(fn i -\u003e i |\u003e rem(2) == 0 end)\nstream |\u003e Enum.into([])\n[1,3,5,7,9,11,13,15,17,19]\n````\n\n## License\n\nMIT\n\n## Contributions \u0026 Bugfixes are most welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeatrichartz%2Fparallel_stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeatrichartz%2Fparallel_stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeatrichartz%2Fparallel_stream/lists"}