{"id":31714335,"url":"https://github.com/supabase-community/functions-ex","last_synced_at":"2025-10-09T01:20:38.412Z","repository":{"id":276237842,"uuid":"926190167","full_name":"supabase-community/functions-ex","owner":"supabase-community","description":"Elixir library to interact with Supabase Edge Functions","archived":false,"fork":false,"pushed_at":"2025-07-15T22:37:24.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-10-05T05:46:37.877Z","etag":null,"topics":["elixir","supabase-functions"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/supabase_functions","language":"Elixir","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/supabase-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2025-02-02T19:02:00.000Z","updated_at":"2025-07-15T22:38:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"5dfb0b52-1331-43e3-9c33-485021a3a1df","html_url":"https://github.com/supabase-community/functions-ex","commit_stats":null,"previous_names":["supabase-community/functions-ex"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/supabase-community/functions-ex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Ffunctions-ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Ffunctions-ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Ffunctions-ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Ffunctions-ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase-community","download_url":"https://codeload.github.com/supabase-community/functions-ex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase-community%2Ffunctions-ex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000725,"owners_count":26082894,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"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":["elixir","supabase-functions"],"created_at":"2025-10-09T01:20:35.805Z","updated_at":"2025-10-09T01:20:38.406Z","avatar_url":"https://github.com/supabase-community.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Supabase Functions\n\n[Edge Functions](https://supabase.com/docs/guides/functions) client implementation for the [Supabase Potion](https://github.com/supabase-community/supabase-ex) SDK in Elixir\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:supabase_potion, \"~\u003e 0.6\"},\n    {:supabase_functions, \"~\u003e 0.1\"}\n  ]\nend\n```\n\n## Usage\n\nGiven a simple Edge Function that simply echos a raw string:\n\n```ts\n// simple-text/index.ts\nDeno.serve(async (req) =\u003e {\n  return new Response(\"Hello from Deno!\", {\n    headers: { \"Content-Type\": \"text/plain\" }\n  });\n});\n```\n\nFrom your Elixir server, after having started your `Supabase.Client` yo ucan inke this function as\n\n```elixir\nclient = Supabase.init_client!(\"SUPABASE_URl\", \"SUPABASE_KEY\")\n\nSupabase.Functions.invoke(client, \"simple-text\")\n# {:ok, %Supabase.Response{status: 200, body: \"Hello from Deno!\"}}\n```\n\nIt also work with data streaming, given an Edge Function\n\n```ts\n// stream-data/index.ts\nDeno.serve(async (req) =\u003e {\n  const stream = new ReadableStream({\n    start(controller) {\n      let count = 0;\n      const interval = setInterval(() =\u003e {\n        if (count \u003e= 5) {\n          clearInterval(interval);\n          controller.close();\n          return;\n        }\n        const message = `Event ${count}\\n`;\n        controller.enqueue(new TextEncoder().encode(message));\n        count++;\n      }, 1000);\n    }\n  });\n\n  return new Response(stream, {\n    headers: {\n      \"Content-Type\": \"text/event-stream\",\n      \"Cache-Control\": \"no-cache\",\n      \"Connection\": \"keep-alive\"\n    }\n  });\n});\n```\n\nThe you could invoke it as\n\n```elixir\nclient = Supabase.init_client!(\"SUPABASE_URl\", \"SUPABASE_KEY\")\n\n# you can control the response streaming handling too (optional)\non_response = fn {status, headers, body} -\u003e\n  require Logger\n\n  Logger.info(\"received response with #{status} status\")\n  Logger.info(\"received #{inspect(headers, pretty: true)} headers\")\n\n  file = File.stream!(\"output.txt\", [:write, :utf8])\n\n  body\n  |\u003e Stream.into(file)\n  |\u003e Stream.run()\nend\n\nSupabase.Functions.invoke(client, \"stream-data\", on_response: on_response)\n# :ok\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase-community%2Ffunctions-ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase-community%2Ffunctions-ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase-community%2Ffunctions-ex/lists"}