{"id":22352811,"url":"https://github.com/jrycw/fasthtml-svcs-edgedb-mvp","last_synced_at":"2026-05-02T13:34:46.195Z","repository":{"id":252954917,"uuid":"842016861","full_name":"jrycw/fasthtml-svcs-edgedb-mvp","owner":"jrycw","description":"MVP: EdgeDB and FastHTML Integration with svcs","archived":false,"fork":false,"pushed_at":"2024-10-15T12:08:37.000Z","size":1598,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T12:14:12.712Z","etag":null,"topics":["database","edgedb","fasthtml","python","svcs"],"latest_commit_sha":null,"homepage":"","language":"Python","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/jrycw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-08-13T13:58:55.000Z","updated_at":"2025-03-09T15:38:24.000Z","dependencies_parsed_at":"2024-12-04T12:30:56.249Z","dependency_job_id":"4463bbb9-213f-4d76-ac51-e56bac13f9c2","html_url":"https://github.com/jrycw/fasthtml-svcs-edgedb-mvp","commit_stats":null,"previous_names":["jrycw/fasthtml-svcs-edgedb-mvp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jrycw/fasthtml-svcs-edgedb-mvp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrycw%2Ffasthtml-svcs-edgedb-mvp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrycw%2Ffasthtml-svcs-edgedb-mvp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrycw%2Ffasthtml-svcs-edgedb-mvp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrycw%2Ffasthtml-svcs-edgedb-mvp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrycw","download_url":"https://codeload.github.com/jrycw/fasthtml-svcs-edgedb-mvp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrycw%2Ffasthtml-svcs-edgedb-mvp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32536579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"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":["database","edgedb","fasthtml","python","svcs"],"created_at":"2024-12-04T12:27:41.350Z","updated_at":"2026-05-02T13:34:46.179Z","avatar_url":"https://github.com/jrycw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fasthtml-svcs-edgedb-mvp\n![todo-list](https://raw.githubusercontent.com/jrycw/fasthtml-svcs-edgedb-mvp/refs/heads/master/todo-list.png)\n\n## Description\nThis repository is focused on building an MVP todo app using `EdgeDB`, `SVCS`, and `FastHTML`.\n\n## EdgeDB schema\n```elm\nmodule default {\n   type Todo {\n      required title: str {\n         constraint exclusive;\n         constraint min_len_value(1);\n         constraint max_len_value(50);\n      };\n   }\n\n   function select_todo_by_id(tid: uuid) -\u003e Todo\n   using (\n      select (assert_exists(assert_single((select Todo filter .id=tid))))\n   )\n}\n```\n\n## Steps for this repo\n1. Write EdgeQL queries and generate code using `edgedb-py` (stick with version 1.9.0, as v2 may have compatibility issues).\n2. Set up the `db_client` in `lifespan.py`.\n3. Define the `dataclass` models.\n4. Implement the `__ft__()` method for the `Todo` dataclass.\n5. Use `svcs.starlette.aget()` to obtain the `AsyncIOClient`.\n6. Execute the generated queries to fetch results.\n7. Convert the results into `Todo` instances, which FastHTML recognizes as a type of FT component, utilizing the `__ft__()` method we defined.\n8. Return the output as FT components.\n9. To get started, ensure `EdgeDB` is set up and then run `uvicorn app.main:app --port 8000 --reload`.\n\n## Refs\n* [FastHTML todo app](https://gallery.fastht.ml/start_simple/sqlite_todo/app/)\n* [FastHTML todo app code](https://gallery.fastht.ml/start_simple/sqlite_todo/code)\n* [SVCS Starlette](https://svcs.hynek.me/en/stable/integrations/starlette.html)\n* [EdgeDB python query builder](https://docs.edgedb.com/guides/tutorials/rest_apis_with_fastapi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrycw%2Ffasthtml-svcs-edgedb-mvp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrycw%2Ffasthtml-svcs-edgedb-mvp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrycw%2Ffasthtml-svcs-edgedb-mvp/lists"}