{ "info": { "author": "Michael Frank", "author_email": "syntaxockey@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2" ], "description": "pesky-defaults\n==============\n\npesky-defaults is a small library for querying platform, distribution,\nand package defaults using a uniform interface. \n\nThe following default keys are made accessible and their values set\naccording to the detected platform:\n\n * PREFIX\n * BIN_DIR\n * SBIN_DIR\n * LIB_DIR\n * LIBEXEC_DIR\n * SYSCONF_DIR\n * LOCALSTATE_DIR\n * RUN_DIR\n * DATA_DIR\n\nA setuptools command is also provided ('pesky_default') so that project\ndefaults can be specified, potentially overriding platform or distribution\ndefaults.\n\n\nBasic Usage\n-----------\n\nTo use pesky-defaults, simply instantiate a new Defaults object and invoke\nthe query methods 'get' or 'getorelse':\n\n::\n\n from pesky.defaults import Defaults\n defaults = Defaults()\n print defaults.get('PREFIX') # displays /usr on a linux platform\n\nThe Defaults class implements the collections.Mapping interface, so you can\nuse the familiar mapping methods as well:\n\n::\n\n print defaults['LIB_DIR'] # displays /usr/lib on a linux platform\n\n\nProject Defaults\n----------------\n\nIf you specify a project name when instantiating the Defaults object, then\nall defaults from the project metadata will be loaded as well:\n\n::\n\n from pesky.defaults import Defaults\n defaults = Defaults('my-project') # the project name as given to setuptools\n\nThis is all well and good, but how do the project defaults get set in the first\nplace? This is where the 'pesky_default' setuptools command comes into play. By\ninvoking the 'pesky_default' setuptools command, the .egg-info file called\n'pesky_defaults.json' is manipulated. Once all project defaults are set as\ndesired, the 'install' setuptools command can be invoked, which will perform the\nstandard setuptools install routine and copy all egg-info files into place. For\nexample:\n\n::\n\n $ cd my-project/\n $ python ./setup.py pesky_default --command set --key foo --value bar\n $ python ./setup.py install\n\nThis snippet enters the source tree of the fictional project 'my-project', adds\nthe project default 'foo', giving it the value 'bar', then installs the project\n(with the updated project defaults). The application code can then retrieve the\n'foo' default:\n\n::\n\n from pesky.defaults import Defaults\n defaults = Defaults('my-project') # the project name as given to setuptools\n print defaults.get('foo') # displays bar", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/msfrank/pesky-defaults", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "pesky-defaults", "package_url": "https://pypi.org/project/pesky-defaults/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pesky-defaults/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/msfrank/pesky-defaults" }, "release_url": "https://pypi.org/project/pesky-defaults/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "Pesky configuration defaults interface", "version": "0.0.2" }, "last_serial": 1109146, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "0b8e124b9cf930b7532cac5b79ccbf92", "sha256": "080b4bd91cb2ad97a594304679aa52c8693e68d36962596c93a13fa745e2865f" }, "downloads": -1, "filename": "pesky-defaults-0.0.1.tar.gz", "has_sig": false, "md5_digest": "0b8e124b9cf930b7532cac5b79ccbf92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3581, "upload_time": "2014-05-28T22:07:04", "url": "https://files.pythonhosted.org/packages/d6/1b/72a0d50604296c581f99d621c20e2939d28e2cf36b5eb2c49e8398c37a4b/pesky-defaults-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "e32a727b48796d36261ed9e764f36604", "sha256": "a16f0b463cfbe8255db645280ca1fde41098740b1d5fecedb4302d3d564a5530" }, "downloads": -1, "filename": "pesky-defaults-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e32a727b48796d36261ed9e764f36604", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5591, "upload_time": "2014-05-30T19:06:06", "url": "https://files.pythonhosted.org/packages/2a/dd/de4b50f08f7c919a7770f096a654c00e4b1893a8cbc07481f9d1d4eabee4/pesky-defaults-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e32a727b48796d36261ed9e764f36604", "sha256": "a16f0b463cfbe8255db645280ca1fde41098740b1d5fecedb4302d3d564a5530" }, "downloads": -1, "filename": "pesky-defaults-0.0.2.tar.gz", "has_sig": false, "md5_digest": "e32a727b48796d36261ed9e764f36604", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5591, "upload_time": "2014-05-30T19:06:06", "url": "https://files.pythonhosted.org/packages/2a/dd/de4b50f08f7c919a7770f096a654c00e4b1893a8cbc07481f9d1d4eabee4/pesky-defaults-0.0.2.tar.gz" } ] }