{"id":22615726,"url":"https://github.com/polyvariant/respectfully","last_synced_at":"2025-04-11T00:13:51.414Z","repository":{"id":220238195,"uuid":"747952622","full_name":"polyvariant/respectfully","owner":"polyvariant","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-05T15:51:13.000Z","size":22,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T00:13:38.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polyvariant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-01-25T00:50:38.000Z","updated_at":"2025-03-18T23:00:19.000Z","dependencies_parsed_at":"2024-02-05T16:47:44.831Z","dependency_job_id":null,"html_url":"https://github.com/polyvariant/respectfully","commit_stats":null,"previous_names":["polyvariant/respectfully"],"tags_count":1,"template":false,"template_full_name":"polyvariant/library-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyvariant%2Frespectfully","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyvariant%2Frespectfully/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyvariant%2Frespectfully/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polyvariant%2Frespectfully/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polyvariant","download_url":"https://codeload.github.com/polyvariant/respectfully/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317730,"owners_count":21083530,"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","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":"2024-12-08T19:09:13.557Z","updated_at":"2025-04-11T00:13:51.394Z","avatar_url":"https://github.com/polyvariant.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ResPeCtfully, an instant RPC microlibrary\n\nRespectfully, sometimes you want to just make that effin RPC call. You don't really care whether it's a POST, a GET, whether something is a query or body parameter. Sometimes you just want it to be over so that you can go home and REST.\n\nPun intended.\n\nDoes this sound like you? You've found the one library truly respectful of your time and energy. No-nonsense RPC is just around the corner!\n\n## Setup\n\nGet the dependency:\n\nsbt:\n\n```scala\n// %%% for JS/native\n\"org.polyvariant\" %% \"respectfully\" % \"version\"\n```\n\nscala-cli\n\n```scala\n//\u003e using dep \"org.polyvariant::respectfully::version\"\n```\n\n## Usage\n\nDefine your interface and derive `API` for it:\n\n```scala\nimport respectfully._\nimport cats.effect._\n\ntrait MyApi derives API {\n  def send(s: String): IO[Unit]\n  def receive(): IO[String]\n}\n```\n\nNow, you can get a server for \"free\":\n\n```scala\nval impl = new MyApi {\n  def send(s: String): IO[Unit] = IO.stub\n  def receive(): IO[String] = IO.stub\n}\n\nval r: org.http4s.HttpApp[IO] = API[MyApi].toRoutes\n```\n\nor a client, given an http4s Client:\n\n```scala\ndef client(http: org.http4s.Client[IO], baseUri: org.http4s.Uri): MyApi =\n  API[MyAPI].toClient(http, baseUri)\n```\n\nYou know what to do next: plug your routes into a server, or plug a backend into your client - and go home early.\n\n## Paying respects\n\nThis library is mostly inspired by the following:\n\n- [autowire](https://github.com/lihaoyi/autowire) (it only supports synchronous or Future-returning methods, and not Scala 3 - at the moment)\n- [Udash RPC](https://guide.udash.io/rpc) (again, only `Future`, no `IO`, also no Scala Native at the moment)\n- [sloth](https://github.com/cornerman/sloth) (different design philosophy, but seems like a good library for solving the same problem)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyvariant%2Frespectfully","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolyvariant%2Frespectfully","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolyvariant%2Frespectfully/lists"}