{"id":18012872,"url":"https://github.com/tonivade/purecfg","last_synced_at":"2025-04-04T14:15:27.042Z","repository":{"id":37103763,"uuid":"237820670","full_name":"tonivade/purecfg","owner":"tonivade","description":"Pure Functional Configuration Library","archived":false,"fork":false,"pushed_at":"2025-03-28T07:05:32.000Z","size":770,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T08:22:03.806Z","etag":null,"topics":["configuration","experimental","functional-programming","java","purefun"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/tonivade.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":"2020-02-02T19:01:19.000Z","updated_at":"2025-03-28T07:05:29.000Z","dependencies_parsed_at":"2024-01-23T08:27:42.317Z","dependency_job_id":"753ec712-0568-4a96-8ae5-d6ff980214d0","html_url":"https://github.com/tonivade/purecfg","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonivade%2Fpurecfg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonivade%2Fpurecfg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonivade%2Fpurecfg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tonivade%2Fpurecfg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tonivade","download_url":"https://codeload.github.com/tonivade/purecfg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190253,"owners_count":20898702,"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":["configuration","experimental","functional-programming","java","purefun"],"created_at":"2024-10-30T03:19:21.859Z","updated_at":"2025-04-04T14:15:27.022Z","avatar_url":"https://github.com/tonivade.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PureCFG\n\nInspired by this [presentation](https://github.com/jdegoes/scalaworld-2015/blob/master/presentation.md)\n\n## Objectives\n\n- Create a pure functional library to load configuration from different sources, like properties files, json, yaml or any other source. \n- Allow to switch from sources without changing the program.\n- Self documented.\n- Type safe.\n\nNow it supports properties and toml files.\n\n## Example\n\n```toml\n[server]\n  host = \"localhost\"\n  port = 8080\n```\n\n```java\nrecord HostAndPort(String host, Integer port) { }\n\nvar readHostAndPort = PureCFG.map2(PureCFG.readString(\"host\"), PureCFG.readInt(\"port\"), HostAndPort::new);\nvar program = PureCFG.readConfig(\"server\", readHostAndPort);\n\nvar config = program.unsafeRun(Source.fromToml(\"config.toml\"));\nassertEquals(new HostAndPort(\"localhost\", 8080), config);\n```\n\n## License\n\nDistributed under MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonivade%2Fpurecfg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonivade%2Fpurecfg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonivade%2Fpurecfg/lists"}