{"id":51102640,"url":"https://github.com/bcdev/remotestate","last_synced_at":"2026-06-24T12:01:17.899Z","repository":{"id":363341402,"uuid":"1222438262","full_name":"bcdev/remotestate","owner":"bcdev","description":"Python state, React UI. One runtime for notebook apps and addon backends.","archived":false,"fork":false,"pushed_at":"2026-06-16T08:11:45.000Z","size":373,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-16T10:12:56.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/bcdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-27T11:15:30.000Z","updated_at":"2026-06-16T08:11:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bcdev/remotestate","commit_stats":null,"previous_names":["bcdev/remotestate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bcdev/remotestate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcdev%2Fremotestate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcdev%2Fremotestate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcdev%2Fremotestate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcdev%2Fremotestate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcdev","download_url":"https://codeload.github.com/bcdev/remotestate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcdev%2Fremotestate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34731256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-24T12:01:16.096Z","updated_at":"2026-06-24T12:01:17.893Z","avatar_url":"https://github.com/bcdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RemoteState\n\n[![CI](https://github.com/bcdev/remotestate/actions/workflows/ci.yml/badge.svg)](https://github.com/bcdev/remotestate/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![PyPI version](https://img.shields.io/pypi/v/remotestate?logo=pypi)](https://pypi.org/project/remotestate/)\n[![npm version](https://img.shields.io/npm/v/remotestate?logo=npm)](https://www.npmjs.com/package/remotestate)\n\n\u003e Python state, React UI.\n\nRemoteState is a Python-first framework for building stateful React frontends. Python owns the state and behavior, while React owns the presentation. Use it when you want a single source of truth in Python and a typed TypeScript bridge in the browser.\n\nIt fits especially well for:\n\n- notebook apps where Python drives the workflow\n- frontend addons or plugins that need an optional Python backend\n- teams that want one runtime for state, actions, queries, and progress updates\n\nIf you want a pure client-side React state library with no Python backend, RemoteState is probably not the right fit.\n\n## What You Get\n\n- Python-owned `Store` state with path-based reads and writes\n- `@action` and `@query` methods for mutating and read-only calls\n- WebSocket synchronization between Python and React\n- typed TypeScript client, provider, and hooks\n- task and progress updates from long-running work\n- notebook and browser serving from the Python runtime\n- optional local fallback clients for addon-style apps\n\n## How It Works\n\n- Python is the source of truth for business state and behavior\n- TypeScript/React renders the UI and calls into Python when needed\n- the WebSocket bridge carries reads, writes, queries, actions, and task updates\n\n## Simple Example\n\n```python\nimport remotestate as rs\n\n\nclass Counter(rs.Service):\n    def __init__(self) -\u003e None:\n        super().__init__(rs.Store({\"count\": 0}))\n\n    @rs.action\n    async def increment(self) -\u003e None:\n        self.store.set(\"count\", self.store.get(\"count\") + 1)\n\n\nservice = Counter()\nrs.serve(service, ui_dist=\"ui/dist\")\n```\n\n```tsx\nimport {\n  RemoteStateProvider,\n  useRemoteState,\n  useRemoteStateClient,\n} from \"remotestate\";\n\ntype CounterService = {\n  increment(): Promise\u003cvoid\u003e;\n};\n\nfunction Counter() {\n  const client = useRemoteStateClient\u003cCounterService\u003e();\n  const [count, setCount] = useRemoteState\u003cnumber\u003e(\"count\", 0);\n\n  return (\n    \u003cdiv\u003e\n      \u003cp\u003eCount: {count}\u003c/p\u003e\n      \u003cbutton onClick={() =\u003e void setCount((n) =\u003e (n ?? 0) + 1)}\u003e\n        Local +1\n      \u003c/button\u003e\n      \u003cbutton onClick={() =\u003e void client.action(\"increment\")}\u003e\n        Backend +1\n      \u003c/button\u003e\n    \u003c/div\u003e\n  );\n}\n\nexport default function App() {\n  return (\n    \u003cRemoteStateProvider url=\"ws://localhost:9753/ws\"\u003e\n      \u003cCounter /\u003e\n    \u003c/RemoteStateProvider\u003e\n  );\n}\n```\n\n## Package Docs\n\n- [Python package README](./remotestate-py/README.md)\n- [TypeScript package README](./remotestate-ts/README.md)\n\n## License\n\nMIT © [@forman](https://github.com/forman)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcdev%2Fremotestate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcdev%2Fremotestate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcdev%2Fremotestate/lists"}