{"id":16657501,"url":"https://github.com/michaelklishin/propertied","last_synced_at":"2025-03-16T23:31:30.663Z","repository":{"id":10370088,"uuid":"12513017","full_name":"michaelklishin/propertied","owner":"michaelklishin","description":"Tiny Clojure library for working with Java property lists (java.util.Properties)","archived":false,"fork":false,"pushed_at":"2017-07-03T07:25:47.000Z","size":46,"stargazers_count":38,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-14T21:26:35.519Z","etag":null,"topics":["clojure","clojurewerkz","java","jvm","library","properties","property-files"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michaelklishin.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-31T23:24:14.000Z","updated_at":"2024-10-31T23:44:57.000Z","dependencies_parsed_at":"2022-08-31T01:51:43.531Z","dependency_job_id":null,"html_url":"https://github.com/michaelklishin/propertied","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/michaelklishin%2Fpropertied","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelklishin%2Fpropertied/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelklishin%2Fpropertied/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michaelklishin%2Fpropertied/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michaelklishin","download_url":"https://codeload.github.com/michaelklishin/propertied/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243647745,"owners_count":20324751,"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":["clojure","clojurewerkz","java","jvm","library","properties","property-files"],"created_at":"2024-10-12T10:00:45.753Z","updated_at":"2025-03-16T23:31:30.225Z","avatar_url":"https://github.com/michaelklishin.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is Propertied\n\nPropertied is a tiny Clojure library that deals with Java property\nlists.\n\n\n## Project Maturity\n\nPropertied is not a young project and unlikely to radically change\n(it is too small in scope).\n\n\n## Artifacts\n\nPropertied artifacts are [released to\nClojars](https://clojars.org/clojurewerkz/propertied). If you are\nusing Maven, add the following repository definition to your\n`pom.xml`:\n\n``` xml\n\u003crepository\u003e\n  \u003cid\u003eclojars.org\u003c/id\u003e\n  \u003curl\u003ehttp://clojars.org/repo\u003c/url\u003e\n\u003c/repository\u003e\n```\n\n### The Most Recent Release\n\nWith Leiningen:\n\n[![Clojars Project](http://clojars.org/clojurewerkz/propertied/latest-version.svg)](http://clojars.org/clojurewerkz/propertied)\n\n\nWith Maven:\n\n``` xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eclojurewerkz\u003c/groupId\u003e\n  \u003cartifactId\u003epropertied\u003c/artifactId\u003e\n  \u003cversion\u003e1.3.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\n## Documentation \u0026 Examples\n\nPropertied makes it easy to convert property lists\n(`java.util.Properties`) into Clojure maps and vice versa. Thus\nworking with property lists is generally as straightforward as working\nwith maps.\n\n`clojurewerkz.propertied.properties/load-from` is a polymorphic\nfunction that instantiates a property list from an input (e.g. a map\nor property file).\n\n`clojurewerkz.propertied.properties/store-to` takes a map and stores\nit into a `.properties` file (an output stream or anything else that\ncan be coerced to `java.io.Writer`).\n\n`clojurewerkz.propertied.properties/properties-\u003emap` is a function\nthat converts a `java.util.Properties` to an immutable\nmap. `clojurewerkz.propertied.properties/map-\u003eproperties` converts the\nopposite way.\n\n``` clojure\n(require '[clojurewerkz.propertied.properties :as p])\n\n(p/load-from {\"a key\" \"a value\"})\n;= {\"a key\" \"a value\"}\n(class (p/load-from {\"a key\" \"a value\"}))\n;= java.util.Properties\n(let [pl (p/load-from {\"a key\" \"a value\"})]\n  (p/properties-\u003emap pl))\n;= {\"a key\" \"a value\"}\n\n;; converting keys to keywords\n(let [pl (p/load-from {\"key\" \"a value\"})]\n  (p/properties-\u003emap pl true))\n;= {:key \"a value\"}\n\n;; loading from files and InputStreams\n(require '[clojure.java.io :as io])\n\n(p/load-from (io/resource \"resource/on/classpath.properties\"))\n(p/load-from (io/file \"resource/on/classpath.properties\"))\n\n;; storing to property files (.properties)\n(p/store-to {\"name\" \"Michael\" \"age\" \"28\"} \"/tmp/michael.properties\")\n(p/store-to {\"name\" \"Michael\" \"age\" \"28\"} (io/file \"/tmp/michael.properties\"))\n(p/store-to {\"name\" \"Michael\" \"age\" \"28\"} (java.io.File/createTempFile \"michael\" \".properties\"))\n```\n\n\n## Community\n\nTo subscribe for announcements of releases, important changes and so\non, please follow [@ClojureWerkz](https://twitter.com/#!/clojurewerkz)\non Twitter.\n\n\n\n## Supported Clojure Versions\n\nPropertied requires Clojure 1.6.\n\n\n## Continuous Integration Status\n\n[![Continuous Integration\nstatus](https://secure.travis-ci.org/michaelklishin/propertied.png)](http://travis-ci.org/michaelklishin/propertied)\n\n\n\n## Propertied Is a ClojureWerkz Project\n\nPropertied is part of the [group of Clojure libraries known as ClojureWerkz](http://clojurewerkz.org), together with\n\n * [Langohr](https://github.com/michaelklishin/langohr)\n * [Elastisch](https://github.com/clojurewerkz/elastisch)\n * [Cassaforte](http://clojurecassandra.info)\n * [Monger](http://clojuremongodb.info)\n * [Neocons](http://clojureneo4j.info)\n * [Quartzite](https://github.com/michaelklishin/quartzite)\n\nand several others.\n\n\n## Development\n\npropertied uses [Leiningen\n2](https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md). Make\nsure you have it installed and then run tests against supported\nClojure versions using\n\n    lein all test\n\nThen create a branch and make your changes on it. Once you are done\nwith your changes and all tests pass, submit a pull request on GitHub.\n\n\n\n## License\n\nCopyright (C) 2013-2017 Michael S. Klishin, Alex Petrov, and the ClojureWerkz team.\n\nDouble licensed under the [Eclipse Public License](http://www.eclipse.org/legal/epl-v10.html) (the same as Clojure) or\nthe [Apache Public License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelklishin%2Fpropertied","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichaelklishin%2Fpropertied","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichaelklishin%2Fpropertied/lists"}