{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "What is it? [![CircleCI](https://img.shields.io/circleci/project/github/LimpidTech/prefer.py.svg?style=flat-squared)](https://circleci.com/gh/LimpidTech/prefer.py) [![Coveralls](https://img.shields.io/coveralls/LimpidTech/prefer.py.svg?style=flat-sqared)](https://coveralls.io/github/LimpidTech/prefer.py)\n-----------\n\nPrefer is a library for helping you manage application configurations while\nproviding your users the flexibility of using whatever configuration format\nfits their needs.\n\nIt provides a set of interfaces which provide standard methods for\nreading arbitrary project configuration data. This can vary from simple cases\nlike JSON, to more complicated examples - such as retreiving configuration data\nfrom a database.\n\n\nHow do I use it?\n----------------\n\nFirstly, you'll want to install the module. This can be done easily with\n`easy_install` or `pip`.\n\n```sh\neasy_install prefer\n\n```\n\nPrefer is fairly simple to use. A basic use case might be that you have the\nfollowing JSON configuration in *settings.json*:\n\n```json\n{\n \"auth\": {\n \"username\": \"user\",\n \"password\": \"pass\"\n }\n}\n```\n\nYou can load these settings with the following code using promises:\n\n```python\nimport prefer\n\nconfiguration = await prefer.load('settings')\nusername = configration.get('auth.username')\n```\n\nYou will notice that prefer only required 'settings' as the filename. It is\nrecommended to be given without a path or extension, because prefer takes care\nof looking through the filesystem for configuration files. On both Unix and\nWindows systems, it will look in all of the standard folders, as well as some\nconventional places where people like to put their configurations.\n\nOrdering matters, so having a file in `./settings.json` as well as another in\n`/etc/settings.json` is still reliable. The configuration in `./settings.json`\nwill be used first. Prefer doesn't care what format your user writes your\nsettings in, so they can also use `settings.yaml` if they like.\n\n\nSupported configuration formats\n-------------------------------\n\nAlong with being fully configurable to support any arbitrary data source you'd\nlike, the following types of data can immediately be used as configuration formats\nupon installation of prefer:\n\n- JSON\n- YAML\n\n\nWhy asyncronous?\n----------------\n\nIn order to supply a more-simple method of getting the configuration, many\nconfiguration tools prefer to provide a blocking method of retrieving a project\nconfiguration. One goal of prefer is to ensure that we aren't limiting users to\nspecific use-cases - and some projects require real-time, dynamic updating of\ntheir configuration. Prefer provides all it's interfaces as asyncronous\nfunctions in order to provide that possibility without the requirement that\nthose actions are blocking.\n\n\n\n[cov]: http://monokro.me/projects/prefer/coverage.html\n[bs]: https://travis-ci.org/LimpidTech/prefer.png?branch=master \"Build Status\"\n[j5]: http://json5.org/ \"json5 - JSON for the ES5 era\"\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "prefer", "package_url": "https://pypi.org/project/prefer/", "platform": "", "project_url": "https://pypi.org/project/prefer/", "project_urls": null, "release_url": "https://pypi.org/project/prefer/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "A user-preference focused configuration library for Python.", "version": "0.1.0" }, "last_serial": 3495831, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f8693e7bac6fc718a3cafea223c3bc47", "sha256": "6615c84510774e675867370fe912b68b5b90f62e0ffb218ac34d665875cf89bf" }, "downloads": -1, "filename": "prefer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f8693e7bac6fc718a3cafea223c3bc47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10459, "upload_time": "2018-01-17T04:52:44", "url": "https://files.pythonhosted.org/packages/13/49/444abe7c46a584a30b615cd100f9dfcd26816680ad0590eadc718048f0e3/prefer-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f8693e7bac6fc718a3cafea223c3bc47", "sha256": "6615c84510774e675867370fe912b68b5b90f62e0ffb218ac34d665875cf89bf" }, "downloads": -1, "filename": "prefer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f8693e7bac6fc718a3cafea223c3bc47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10459, "upload_time": "2018-01-17T04:52:44", "url": "https://files.pythonhosted.org/packages/13/49/444abe7c46a584a30b615cd100f9dfcd26816680ad0590eadc718048f0e3/prefer-0.1.0.tar.gz" } ] }