{"id":20754508,"url":"https://github.com/atlassian-labs/flowbius","last_synced_at":"2025-04-28T16:40:38.553Z","repository":{"id":43705891,"uuid":"450276182","full_name":"atlassian-labs/Flowbius","owner":"atlassian-labs","description":"Kotlin Flow \u003c-\u003e Spotify Mobius interop","archived":false,"fork":false,"pushed_at":"2024-04-10T18:56:00.000Z","size":116,"stargazers_count":59,"open_issues_count":1,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T11:23:34.753Z","etag":null,"topics":["kotlin","kotlin-coroutines","kotlin-coroutines-flow","mobius"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/atlassian-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-01-20T22:21:53.000Z","updated_at":"2024-12-11T22:31:09.000Z","dependencies_parsed_at":"2024-04-10T19:44:13.139Z","dependency_job_id":"13b69dbe-402b-4176-8a6a-582c2662dc5b","html_url":"https://github.com/atlassian-labs/Flowbius","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlassian-labs%2FFlowbius","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlassian-labs%2FFlowbius/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlassian-labs%2FFlowbius/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atlassian-labs%2FFlowbius/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atlassian-labs","download_url":"https://codeload.github.com/atlassian-labs/Flowbius/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251347548,"owners_count":21575099,"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":["kotlin","kotlin-coroutines","kotlin-coroutines-flow","mobius"],"created_at":"2024-11-17T09:18:06.062Z","updated_at":"2025-04-28T16:40:38.532Z","avatar_url":"https://github.com/atlassian-labs.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flowbius\n\n[![Atlassian license](https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square)](LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](CONTRIBUTING.md)\n\nFlowbius provides interoperability extensions for using [Kotlin Flows](https://kotlinlang.org/docs/flow.html) with [Mobius](https://github.com/spotify/mobius). They allow conversion from Flows to Mobius types and vice versa, as well as utilities to setup Mobius loops using Flows.\n\nFlowbius is analogous to what `mobius-rx` provides for RxJava/Mobius interoperability.\n\n## Usage\n\nFlowbius provides converters from Flow types to Mobius types:\n\n```kotlin\n// Flow -\u003e EventSource\nval eventSource = flowOf(1, 2, 3).asEventSource()\n\n// EventSource -\u003e Flow\nval flow = eventSource.asFlow()\n\n// FlowTransformer -\u003e Connectable\nval connectable = { source: Flow\u003cString\u003e -\u003e source.map { it.length } }.asConnectable()\n\n// Apply a Connectable to a Flow as a flatMap which merges emissions\nval transformedFlow = flow.flatMapMerge(connectable)\n```\n\nYou can also create a Mobius loop with Flow-based subtype effect handler:\n\n```kotlin\nval loop = FlowMobius.loop\u003cModel, Event, Effect\u003e(\n  update = UpdateLogic(),\n  effectHandler = subtypeEffectHandler {\n    addConsumer(::handleEffects)\n    addFunction(::effectToEvents)\n  }\n).startFrom(Model())\n```\n\n## Installation\n\nYou can retrieve Flowbius from [Maven Central](https://search.maven.org/artifact/com.trello.flowbius/flowbius).\n\n```\nimplementation 'com.trello.flowbius:flowbius:0.1.3'\n```\n\n## Tests\n\n```\n$ ./gradlew tests\n```\n\n## Contributions\n\nContributions to Flowbius are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details. \n\n## License\n\nCopyright (c) 2022 Atlassian and others.\nApache 2.0 licensed, see [LICENSE](LICENSE) file.\n\n\u003cbr/\u003e \n\n[![With ❤️ from Atlassian](https://raw.githubusercontent.com/atlassian-internal/oss-assets/master/banner-cheers.png)](https://www.atlassian.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlassian-labs%2Fflowbius","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatlassian-labs%2Fflowbius","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatlassian-labs%2Fflowbius/lists"}