{ "info": { "author": "Daniel Waardal", "author_email": "waawal@boom.ws", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Distributed Computing", "Topic :: System :: Systems Administration" ], "description": ".. image:: http://farm5.staticflickr.com/4022/4297831216_ea3ef99461_t.jpg\n :alt: http://www.flickr.com/photos/vj-dipsy/4297831216/\n :align: right\n :target: http://pypi.python.org/pypi/wr\n\nwr (Weighted Random)\n==========================\n\n*wr is a weighted random implementation in Python.*\n\n``wr.choice`` can be fed with a mapping (such as dictionaries) containing a returnable (what to return) and a integer representing their respective weight. \nThe key can be anything hashable but the weight must be a integer.\n\nOptionally you may feed ``wr.choice`` with a sequence of pairs.\n\nDocumentation\n-------------\n\nDocumentation is available at http://wr.readthedocs.org/\n\nExample\n-------\n::\n\n >>> import wr\n \n >>> data = {'cat': 60, 'dog': 30, 'bird': 10}\n >>> animal = wr.choice(data)\n >>> print animal\n cat # well, the cat had a good 60% shot at it.\n\nInstallation\n-----------------------------\n\nInstall wr with ``pip install wr`` or just `download wr.py `_ and place it in your project directory.\n\nLicense\n-------\n`BSD `_", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://weighted-random.github.com/wr/", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "wr", "package_url": "https://pypi.org/project/wr/", "platform": "any", "project_url": "https://pypi.org/project/wr/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://weighted-random.github.com/wr/" }, "release_url": "https://pypi.org/project/wr/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "wr is a simple, lightweight module that provides random choice based on weights.", "version": "0.2.1" }, "last_serial": 801731, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d0911f2008f91aee7b082ae7bf2634ea", "sha256": "a87b4c41a81465ce933e739102fb892ed36639a216a494d03ccb142311aec1f0" }, "downloads": -1, "filename": "wr-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d0911f2008f91aee7b082ae7bf2634ea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2117, "upload_time": "2012-04-11T16:12:47", "url": "https://files.pythonhosted.org/packages/13/06/651ee263ace92df2e1490f98794cd6cdab8bafccfb966e02b0128b777674/wr-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8c8c8334336187072200e5a7f41cd964", "sha256": "102cc5c6f5ab612829ee18b392729511d811159e407dd6b2632a03542f427136" }, "downloads": -1, "filename": "wr-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8c8c8334336187072200e5a7f41cd964", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2116, "upload_time": "2012-04-11T16:16:24", "url": "https://files.pythonhosted.org/packages/02/f8/9aad0cb383bc506eb8e4d11e21b9b891a09dfdb92b7c47b487e527c2fec5/wr-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2432aae482633bf03627f46f6b096b1b", "sha256": "93a37be2a57327a25eb5696f77474e6f8e696e63365ab39bb0740f8be495f9dd" }, "downloads": -1, "filename": "wr-0.1.2.tar.gz", "has_sig": false, "md5_digest": "2432aae482633bf03627f46f6b096b1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2360, "upload_time": "2012-04-11T22:36:46", "url": "https://files.pythonhosted.org/packages/8f/f7/02d4980465a411aabd6db0a8dd2c73bafc6606778470d6e1c67ba68cce6e/wr-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "91cb3af95c2202d73fdd0aecc574daa2", "sha256": "3677da08364c9dca4bf10875a068aee3fa128a3089bb9109e8e790ac3716925e" }, "downloads": -1, "filename": "wr-0.1.3.tar.gz", "has_sig": false, "md5_digest": "91cb3af95c2202d73fdd0aecc574daa2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2258, "upload_time": "2012-04-12T16:23:45", "url": "https://files.pythonhosted.org/packages/0a/b9/a9cabb64b79bf62f84304ee2bfeb2a1493c45b6c92caa53f74e12f25afed/wr-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "15b423069d8317fbd109e30f62b7c207", "sha256": "f68107b4dd8c1c00d23afed1b5aebdfca87d5a702a041c45e88fd776b579574f" }, "downloads": -1, "filename": "wr-0.1.4.tar.gz", "has_sig": false, "md5_digest": "15b423069d8317fbd109e30f62b7c207", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2399, "upload_time": "2012-04-13T04:22:54", "url": "https://files.pythonhosted.org/packages/d4/ed/7d1457a22e593811c8a5d6ced3229cf87481c6287d8dd5a2e930510aea5e/wr-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "85b5f5cc8a6fb14379b32a162f29a015", "sha256": "99084c6ffcae394da0498e5660a286194cc3f59ffd8f741365da8fd8dc622511" }, "downloads": -1, "filename": "wr-0.1.5.tar.gz", "has_sig": false, "md5_digest": "85b5f5cc8a6fb14379b32a162f29a015", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2481, "upload_time": "2012-04-14T21:01:08", "url": "https://files.pythonhosted.org/packages/54/66/461dcdd9af25dd6c03d72f5149900524c22c05a18c5011d93a737626af49/wr-0.1.5.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7a671c1155a92969b382ec8fdba91fcb", "sha256": "e9553f1586f330c31948ef450c33e4f6813909f8019ac8938c7e9b844721dc75" }, "downloads": -1, "filename": "wr-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7a671c1155a92969b382ec8fdba91fcb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2547, "upload_time": "2012-04-25T09:03:12", "url": "https://files.pythonhosted.org/packages/ce/5a/f52b980d04db516532997115bd5c648d8da9c8ae0573b9773f0525be4c2a/wr-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ac7e25966f51ad6a3b29fdcebc38a5bf", "sha256": "2bcc54c1feda299daa0b8cec77d2457892b13a0a7962bedc1d08a494d1d85542" }, "downloads": -1, "filename": "wr-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ac7e25966f51ad6a3b29fdcebc38a5bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2609, "upload_time": "2012-07-03T23:06:39", "url": "https://files.pythonhosted.org/packages/ec/71/76fb64c483efee9ac4d23f7c92dbe42551cbacb4fa76881194a047b08b51/wr-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ac7e25966f51ad6a3b29fdcebc38a5bf", "sha256": "2bcc54c1feda299daa0b8cec77d2457892b13a0a7962bedc1d08a494d1d85542" }, "downloads": -1, "filename": "wr-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ac7e25966f51ad6a3b29fdcebc38a5bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2609, "upload_time": "2012-07-03T23:06:39", "url": "https://files.pythonhosted.org/packages/ec/71/76fb64c483efee9ac4d23f7c92dbe42551cbacb4fa76881194a047b08b51/wr-0.2.1.tar.gz" } ] }