{"id":18078413,"url":"https://github.com/techgaun/named_arguments","last_synced_at":"2025-12-31T14:15:44.342Z","repository":{"id":62429979,"uuid":"124831446","full_name":"techgaun/named_arguments","owner":"techgaun","description":"Python like named arguments in Elixir","archived":false,"fork":false,"pushed_at":"2018-09-01T23:53:55.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-08T14:55:52.805Z","etag":null,"topics":["elixir","named-arguments"],"latest_commit_sha":null,"homepage":null,"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/techgaun.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}},"created_at":"2018-03-12T03:56:56.000Z","updated_at":"2020-06-03T23:05:27.000Z","dependencies_parsed_at":"2022-11-01T20:07:29.750Z","dependency_job_id":null,"html_url":"https://github.com/techgaun/named_arguments","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techgaun/named_arguments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fnamed_arguments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fnamed_arguments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fnamed_arguments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fnamed_arguments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techgaun","download_url":"https://codeload.github.com/techgaun/named_arguments/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techgaun%2Fnamed_arguments/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265866112,"owners_count":23840936,"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":["elixir","named-arguments"],"created_at":"2024-10-31T12:13:56.534Z","updated_at":"2025-12-31T14:15:44.316Z","avatar_url":"https://github.com/techgaun.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# named_arguments [![Hex version](https://img.shields.io/hexpm/v/named_arguments.svg \"Hex version\")](https://hex.pm/packages/named_arguments) ![Hex downloads](https://img.shields.io/hexpm/dt/named_arguments.svg \"Hex downloads\") [![Build Status](https://travis-ci.org/techgaun/named_arguments.svg?branch=master)](https://travis-ci.org/techgaun/named_arguments)\n\n\u003e Named arguments in Elixir\n\nThis package abuses macros to use keyword lists\nand maps to mimic named arguments in Elixir.\n\nInstallation:\n\n```elixir\n{:named_arguments, \"~\u003e 0.1.0\"}\n```\n\nThe usage is very simple:\n\n```elixir\ndefmodule Analyzer do\n  use NamedArguments\n\n  def query(opts \\\\ [aggregate: :sum, range: \"1h\"]) do\n    IO.puts \"running query with #{opts[:aggregate]} over range #{opts[:range]}\"\n  end\nend\n\nAnalyzer.query()\n# running query with sum over range 1h\n\nAnalyzer.query(aggregate: :avg)\n# running query with avg over range 1h\n```\n\nWhile the above example shows Keyword list example, this works fine with maps as well.\n\nYou can check the [test](test/named_arguments_test.exs) for more examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechgaun%2Fnamed_arguments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechgaun%2Fnamed_arguments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechgaun%2Fnamed_arguments/lists"}