{"id":13561342,"url":"https://github.com/dashbitco/flow","last_synced_at":"2025-05-12T15:27:52.479Z","repository":{"id":40781179,"uuid":"79287141","full_name":"dashbitco/flow","owner":"dashbitco","description":"Computational parallel flows on top of GenStage","archived":false,"fork":false,"pushed_at":"2025-02-25T07:43:53.000Z","size":359,"stargazers_count":1583,"open_issues_count":1,"forks_count":89,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-05-08T00:51:54.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/flow","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dashbitco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2017-01-18T00:32:54.000Z","updated_at":"2025-05-06T11:49:31.000Z","dependencies_parsed_at":"2024-05-01T15:27:32.723Z","dependency_job_id":"1ff22d11-f3ea-44ba-a083-f39834bbeabc","html_url":"https://github.com/dashbitco/flow","commit_stats":{"total_commits":166,"total_committers":42,"mean_commits":"3.9523809523809526","dds":0.6686746987951807,"last_synced_commit":"d87b4a1f8beb0a7e93e6028c54afc825e82b9167"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashbitco%2Fflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashbitco%2Fflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashbitco%2Fflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dashbitco%2Fflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dashbitco","download_url":"https://codeload.github.com/dashbitco/flow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253428456,"owners_count":21906921,"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":[],"created_at":"2024-08-01T13:00:55.128Z","updated_at":"2025-05-12T15:27:52.432Z","avatar_url":"https://github.com/dashbitco.png","language":"Elixir","funding_links":[],"categories":["Algorithms and Data structures"],"sub_categories":[],"readme":"# Flow [![Build Status](https://github.com/dashbitco/flow/workflows/CI/badge.svg)](https://github.com/dashbitco/flow/actions?query=workflow%3A%22CI%22)\n\n`Flow` allows developers to express computations on collections, similar to the `Enum` and `Stream` modules, although computations will be executed in parallel using multiple [`GenStage`](https://github.com/elixir-lang/gen_stage)s.\n\nHere is a quick example on how to count words in a document in parallel with Flow:\n\n```elixir\nFile.stream!(\"path/to/some/file\")\n|\u003e Flow.from_enumerable()\n|\u003e Flow.flat_map(\u0026String.split(\u00261, \" \"))\n|\u003e Flow.partition()\n|\u003e Flow.reduce(fn -\u003e %{} end, fn word, acc -\u003e\n  Map.update(acc, word, 1, \u0026 \u00261 + 1)\nend)\n|\u003e Enum.to_list()\n```\n\nSee documentation for [Flow](https://hexdocs.pm/flow) or [José Valim's keynote at ElixirConf 2016](https://youtu.be/srtMWzyqdp8?t=244) introducing the main concepts behind [GenStage](https://github.com/elixir-lang/gen_stage) and [Flow](https://hexdocs.pm/flow).\n\n## Installation\n\nFlow requires Elixir v1.7 and Erlang/OTP 22+. Add `:flow` to your list of dependencies in mix.exs:\n\n```elixir\ndef deps do\n  [{:flow, \"~\u003e 1.0\"}]\nend\n```\n\n### Usage in Livebook\n\nFlow pipelines starts several processes linked to the current process. This means that, if there is an error in your Flow, it will shut down the Livebook runtime. You can avoid this in your notebooks in two different ways:\n\n1. Use `Flow.stream(flow, link: false)` to explicitly convert a Flow to a non-linked stream. You can them invoke `Enum` and `Stream` functions regularly:\n\n    ```elixir\n    Flow.from_enumerable([1, 2, 3])\n    |\u003e Flow.map(\u0026 \u00261 * 2)\n    |\u003e Flow.stream(link: false)\n    |\u003e Enum.to_list()\n    ```\n\n2. By trapping exits once before the Flow computation starts:\n\n    ```elixir\n    Process.flag(:trap_exit, true)\n    ```\n\n## License\n\nCopyright 2017 Plataformatec \\\nCopyright 2020 Dashbit\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashbitco%2Fflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdashbitco%2Fflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdashbitco%2Fflow/lists"}