{"id":15706680,"url":"https://github.com/tdakkota/sun","last_synced_at":"2025-05-12T19:02:43.490Z","repository":{"id":45948365,"uuid":"354510305","full_name":"tdakkota/sun","owner":"tdakkota","description":"Python-compatible built-ins for Starlark written in Go.","archived":false,"fork":false,"pushed_at":"2023-10-27T11:59:07.000Z","size":92,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T01:51:09.428Z","etag":null,"topics":["builtin","builtin-functions","golang","module","python","starlark","starlark-go"],"latest_commit_sha":null,"homepage":"","language":"Go","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/tdakkota.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":"2021-04-04T10:02:29.000Z","updated_at":"2023-01-01T16:21:56.000Z","dependencies_parsed_at":"2024-10-24T07:43:09.500Z","dependency_job_id":"aba1ad79-0263-425d-8cdf-283b71eef172","html_url":"https://github.com/tdakkota/sun","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdakkota%2Fsun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdakkota%2Fsun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdakkota%2Fsun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdakkota%2Fsun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tdakkota","download_url":"https://codeload.github.com/tdakkota/sun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253805850,"owners_count":21967052,"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":["builtin","builtin-functions","golang","module","python","starlark","starlark-go"],"created_at":"2024-10-03T20:26:25.998Z","updated_at":"2025-05-12T19:02:43.448Z","avatar_url":"https://github.com/tdakkota.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sun\r\nSun is a Starlark module which adds Python-compatible built-ins like [`map`](https://docs.python.org/3/library/functions.html#map) and [`filter`](https://docs.python.org/3/library/functions.html#filter).\r\n\r\n## Installation\r\n```bash\r\ngo get github.com/tdakkota/sun\r\n```\r\n\r\n## Usage\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\r\n\t\"go.starlark.net/starlark\"\r\n\r\n\t\"github.com/tdakkota/sun\"\r\n)\r\n\r\nfunc main() {\r\n\tcode := \"list(filter(lambda x: x % 2 == 0, range(10)))\"\r\n\r\n\t// Eval Starlark expresion.\r\n\tthread := \u0026starlark.Thread{Name: \"main\"}\r\n\tresult, err := starlark.Eval(thread, \"example.star\", code, sun.Module.Members)\r\n\tif err != nil {\r\n\t\tpanic(err)\r\n\t}\r\n\r\n\tfmt.Println(result)\r\n\t// Output:\r\n\t// [0, 2, 4, 6, 8]\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdakkota%2Fsun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftdakkota%2Fsun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdakkota%2Fsun/lists"}