{"id":33196619,"url":"https://github.com/mode89/sodium-python","last_synced_at":"2026-01-16T13:08:39.829Z","repository":{"id":43647672,"uuid":"511489098","full_name":"mode89/sodium-python","owner":"mode89","description":"Python implementation of Sodium - Functional Reactive Programming (FRP) Library","archived":false,"fork":false,"pushed_at":"2023-07-18T03:45:33.000Z","size":128,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-21T02:03:50.653Z","etag":null,"topics":["frp","functional-programming","functional-reactive-programming","python"],"latest_commit_sha":null,"homepage":"https://sodium-python.readthedocs.io","language":"Python","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/mode89.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-07-07T10:50:44.000Z","updated_at":"2024-10-11T12:42:48.000Z","dependencies_parsed_at":"2024-01-18T15:56:15.543Z","dependency_job_id":"f434344a-be15-4433-9742-cc6e4eace64d","html_url":"https://github.com/mode89/sodium-python","commit_stats":{"total_commits":89,"total_committers":1,"mean_commits":89.0,"dds":0.0,"last_synced_commit":"bf17a2f16f6f958818781960b36c60cb8a403a92"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mode89/sodium-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fsodium-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fsodium-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fsodium-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fsodium-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mode89","download_url":"https://codeload.github.com/mode89/sodium-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fsodium-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["frp","functional-programming","functional-reactive-programming","python"],"created_at":"2025-11-16T08:00:27.637Z","updated_at":"2026-01-16T13:08:39.813Z","avatar_url":"https://github.com/mode89.png","language":"Python","readme":"# Sodium\n\nPort of [Sodium](https://github.com/SodiumFRP/sodium) - Functional Reactive Programming (FRP) library - to Python.\n\n\n## Installation\n\nJust `pip install sodiumfrp`.\n\n\n## Main Concepts\n\n### Streams and Cells\n\nThis library is based on two types:\n[`Stream`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.Stream)\nand [`Cell`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.Cell).\n`Stream` represents a *stream of events*, while `Cell` represents a *value that changes over time*.\n\n### Operators\n\nThere is also a bunch of primitives that you can use to build streams/cells and to compose them together.\nThey provide means for doing common operations like mapping, filtering, reduction, flat-mapping and more.\nAll of them are implemented as members of\n[`Stream`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.Stream)\nand [`Cell`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.Cell) classes.\n\n### Forward references\n\nIn situations, where a stream or cell needs to be referenced *before* it is assigned, use\n[`StreamLoop`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.StreamLoop) or\n[`CellLoop`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.CellLoop).\n\n### Interfacing with imperative world\n\n`Stream` and `Cell` lets you model your business logic in a *purely functional* way.\nIn order to provide your model with input data, use\n[`StreamSink`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.StreamSink) and\n[`CellSink`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.CellSink).\nAnd, whenever you need to get data out of the model, use\n[`Stream.listen()`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.Stream.listen)\nand [`Cell.listen()`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.primitives.Cell.listen).\n\nWhen an input value is pushed into a stream or cell, Sodium automatically starts a *transaction*.\nAny state changes, that occur as a result of that input, are performed within the same *transaction*.\nMost of the time you don't need to do anything, but it is possible to start a transaction explicitly via\n[`Transaction.run()`](https://sodium-python.readthedocs.io/en/latest/sodiumfrp.html#sodiumfrp.transaction.Transaction.run).\nFor example:\n* It often makes sense for all the program initialization to be wrapped in a single, big transaction.\n* `StreamLoop` and `CellLoop` require an explicit transaction.\n\n### The Book\n\nThe most comprehensive guide on FRP and this library would be the book\n[Functional Reactive Programming by Stephen Blackheath](https://www.manning.com/books/functional-reactive-programming).\nEven though, the book aims Java, it is pretty straightforward to map it into Python.\n\n\n## Examples\n\nSee [examples](examples) directory.\n\n\n## Development\n\nTo run the tests, execute `pytest` from the package directory.\n\nTo build [API reference](https://sodium-python.readthedocs.io), go to `docs` directory and run `make html`.\nIt requires `sphinx` and `sphinx-rtd-theme` packages to be installed.\n\n\n## License\n\nDistributed under [BSD 3-Clause](https://github.com/SodiumFRP/sodium/blob/master/COPYING).\n","funding_links":[],"categories":["Awesome Functional Python"],"sub_categories":["Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmode89%2Fsodium-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmode89%2Fsodium-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmode89%2Fsodium-python/lists"}