{"id":30409723,"url":"https://github.com/aswanthmanoj/fluidkit","last_synced_at":"2026-03-05T04:02:24.105Z","repository":{"id":302932261,"uuid":"1013968260","full_name":"AswanthManoj/Fluidkit","owner":"AswanthManoj","description":"Full-stack web development for the pythoniers with the power of svelte","archived":false,"fork":false,"pushed_at":"2026-02-27T09:57:09.000Z","size":775,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-27T15:14:43.616Z","etag":null,"topics":["code-generation","fastapi","fullstack-development","python-fullstack","python-with-sveltekit","sveltekit"],"latest_commit_sha":null,"homepage":"","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/AswanthManoj.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-04T19:35:30.000Z","updated_at":"2026-02-27T09:57:04.000Z","dependencies_parsed_at":"2025-07-26T14:17:35.779Z","dependency_job_id":"21a168e6-3671-4ee1-8ff3-c80b73c52384","html_url":"https://github.com/AswanthManoj/Fluidkit","commit_stats":null,"previous_names":["aswanthmanoj/fluidkit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AswanthManoj/Fluidkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswanthManoj%2FFluidkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswanthManoj%2FFluidkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswanthManoj%2FFluidkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswanthManoj%2FFluidkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AswanthManoj","download_url":"https://codeload.github.com/AswanthManoj/Fluidkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AswanthManoj%2FFluidkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30109076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T03:40:26.266Z","status":"ssl_error","status_checked_at":"2026-03-05T03:39:15.902Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["code-generation","fastapi","fullstack-development","python-fullstack","python-with-sveltekit","sveltekit"],"created_at":"2025-08-21T22:26:12.498Z","updated_at":"2026-03-05T04:02:24.097Z","avatar_url":"https://github.com/AswanthManoj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FluidKit\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://azure-deliberate-dog-514.mypinata.cloud/ipfs/bafkreiay74jzankyzj2zh4zemmpidafbsrcr4hwjxnl5e3qk32xyi6t3hi\" alt=\"FluidKit Logo\" width=\"125\"\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003eWeb development for the Pythonist\u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\nFluidKit bridges Python and SvelteKit into a unified fullstack framework. Write backend functions in Python — FluidKit registers them as FastAPI endpoints and wraps them in SvelteKit-native remote functions with full type safety, cookie forwarding, file uploads, redirects, and single-flight cache invalidation.\n\n```bash\npip install fluidkit\n```\n\n\n\n## How it works\n\nDecorate Python functions. FluidKit registers them as FastAPI endpoints internally and generates colocated `.remote.ts` files that SvelteKit imports as [remote functions](https://svelte.dev/docs/kit/remote-functions) directly.\n\n```python\n# src/lib/demo.py\nfrom fluidkit import query, command, form\n\ndb = {\n    \"posts\": [\n        {\"id\": 1, \"title\": \"Hello World\", \"content\": \"This is the first post.\", \"likes\": 10},\n        {\"id\": 2, \"title\": \"Fluidkit\", \"content\": \"Fluidkit is awesome!\", \"likes\": 50},\n        {\"id\": 3, \"title\": \"Python and Svelte\", \"content\": \"Using Python with Svelte is great!\", \"likes\": 25},\n    ]\n}\n\n@query\nasync def get_posts():\n    return db[\"posts\"]\n\n@command\nasync def like_post(post_id: int):\n    for post in db[\"posts\"]:\n        if post[\"id\"] == post_id:\n            post[\"likes\"] += 1\n\n            # invalidates client cache in the same request with single flight mutations\n            await get_posts().refresh()\n            return True\n    return None\n\n@form\nasync def add_post(title: str, content: str):\n    new_post = {\n        \"id\": len(db[\"posts\"]) + 1,\n        \"title\": title,\n        \"content\": content,\n        \"likes\": 0,\n    }\n    db[\"posts\"].append(new_post)\n\n    await get_posts().refresh() # invalidates client cache in the same request with single flight mutations\n```\n\n```svelte\n\u003c!-- src/routes/+page.svelte --\u003e\n\u003cscript\u003e\n    import { get_posts, like_post, add_post } from '$lib/demo.remote';\n\u003c/script\u003e\n\n\u003cform {...add_post}\u003e\n  \u003cinput {...add_post.fields.title.as('text')} placeholder=\"Title\" /\u003e\n  \u003cinput {...add_post.fields.content.as('text')} placeholder=\"Content\" /\u003e\n  \u003cbutton\u003eAdd Post\u003c/button\u003e\n\u003c/form\u003e\n\n{#each await get_posts() as post}\n  \u003cdiv\u003e\n    \u003ch2\u003e{post.title}\u003c/h2\u003e\n    \u003cp\u003e{post.content}\u003c/p\u003e\n    \u003cbutton onclick={async () =\u003e await like_post(post.id)}\u003e\n      👍 {post.likes}\n    \u003c/button\u003e\n  \u003c/div\u003e\n{/each}\n```\n\nNo manual fetch calls. No duplicated types. No glue code.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e🤫 how does this work?\u003c/b\u003e\u003c/summary\u003e\nFluidKit reflects on your decorated functions at import time — inspecting parameters, return types, and Pydantic models — and generates colocated `.remote.ts` files wrapping each function in a SvelteKit-native `query`, `command`, `form`, or `prerender` remote function call. In dev mode this re-runs on every save via HMR. The generated files are real TypeScript you can inspect, import, and version control.\n\u003c/details\u003e\n\n\n\n## Decorators\n\n| Decorator | Use case | SvelteKit docs |\n|---|---|---|\n| `@query` | Read data — cached, refreshable | [query](https://svelte.dev/docs/kit/remote-functions#query) |\n| `@command` | Write data — single-flight cache invalidation | [command](https://svelte.dev/docs/kit/remote-functions#command) |\n| `@form` | Form actions — file uploads, progressive enhancement, redirects | [form](https://svelte.dev/docs/kit/remote-functions#form) |\n| `@prerender` | Build-time data fetching with optional runtime fallback | [prerender](https://svelte.dev/docs/kit/remote-functions#prerender) |\n\n\n\n## CLI\n\n```bash\nfluidkit init                # scaffold SvelteKit project with FluidKit wired in\nfluidkit dev                 # run FastAPI + Vite together with HMR\nfluidkit build               # codegen + npm run build\nfluidkit preview             # preview production build locally\n```\n\nNo system Node.js required — FluidKit uses `nodejs-wheel` for all Node operations. npm, npx, and node are available through the CLI:\n\n```bash\nfluidkit install tailwindcss          # shorthand for npm install\nfluidkit install -D prettier          # install as dev dependency\nfluidkit npm run build                # any npm command\nfluidkit npx sv add tailwindcss       # any npx command\nfluidkit node scripts/seed.js         # run node directly\n```\n\n\n\n## Project config\n\n```json\n// fluidkit.config.json\n{\n  \"entry\": \"src/app.py\",\n  \"host\": \"0.0.0.0\",\n  \"backend_port\": 8000,\n  \"frontend_port\": 5173,\n  \"schema_output\": \"src/lib/fluidkit\",\n  \"watch_pattern\": \"./*.py\"\n}\n```\n\n\u003e NOTE: Flags override config. Config overrides defaults.\n\n\n\n## Built with\n\n- [SvelteKit](https://svelte.dev/docs/kit) — frontend framework with remote functions\n- [FastAPI](https://fastapi.tiangolo.com/) — API layer and request handling\n- [Pydantic](https://docs.pydantic.dev/) — type extraction and validation\n- [Jurigged](https://github.com/breuleux/jurigged) — hot module reloading in dev mode\n- [nodejs-wheel](https://github.com/nicolo-ribaudo/nodejs-wheel) — bundled Node.js, no system install needed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faswanthmanoj%2Ffluidkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faswanthmanoj%2Ffluidkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faswanthmanoj%2Ffluidkit/lists"}