{ "info": { "author": "Various", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "PLOD - Brief Introduction\n=========================\n\n*PLOD* is a simpler and easier way to manipulate lists of dictionaries. *PLOD* stands for Pythonic Lists of Dictionaries.\n\nWhy Lists of Dictionaries? Why PLOD?\n------------------------------------\n\nIncreasingly, software is passing more complex data stores between machines and between processes. Examples include RESTful XML, JSON/MongoDB, Google protobuf, RabbitMQ, etc.\n\nThese data stores can include lists of collections, and each collection can have many attributes/values. In Python, these are often internally represented as a list containing dictionaries. For example, if you needed to represent a list of fruits available for purchase:\n\n::\n\n fruits = [\n {\"name\": \"bannana\", \"color\": \"yellow\", \"qty\": 9, \"sizes\": [2, 2.4, 3]},\n {\"name\": \"cherry\", \"qty\": 40, \"sizes\": [3, 2, 9]},\n {\"name\": \"lime\", \"color\": \"green\", \"qty\": 2, \"sizes\": [2]},\n ]\n\n\nOne could, of course, pass such a structure into a SQL database such as MySQL or PostgreSQL for manipulation. But that can be overkill for a small amount of temporary data, especially when the infrastructure requirements are light and response time is critical. In that case, manipulating such a list might make more sense to do in-memory within Python itself.\n\nIf it is simple enough, one could do so directly using Python. For example:\n\n::\n\n abundant_fruit = [f for f in fruits if f['qty']>5]\n\nBut, if the program you are writing does such manipulations regularly, and those manipulations are somewhat more complex, then PLOD might be worth using. To mimic the previous example, this time with PLOD:\n\n::\n\n from PLOD import PLOD\n abundant_fruit = PLOD(fruit).gt('qty',5).returnList()\n\nOr a more complex example:\n\n::\n\n from PLOD import PLOD\n my_fruit = PLOD(fruit).sort(\"color\").contains(\"sizes\", [3]).renumber(\"id\", insert=True).returnList()\n\nHere the list is sorted by color (missing colors at the top), filtered to entries with a size 3, and renumbered with a new key called \"id\".\n\nInstallation\n------------\n\nInstall _PLOD_ using pip:\n\n::\n\n pip install PLOD\n\nHow to Use\n----------\n\nIn general, one simply:\n\n1. Creates an instance of the PLOD class.\n2. Chains together methods of the class to manipulate the list.\n3. Uses a \"return\" method to get the results you want.\n\nFor example, to sort a list:\n\n::\n\n from PLOD import PLOD\n my_list = PLOD(fruits).sort(\"qty\").returnList()\n\nOr, to get a string with comma-separated values with a filter:\n\n::\n\n from PLOD import PLOD\n csv = PLOD(fruits).gt('qty', 1).returnCSV(keys=['name', 'sizes'])\n\nFor more detailed information, please visit the `Documentation `_\nand `Library Reference `_\n\n\nOther Resources\n===============\n\n* `GitHub Repository `_\n\n* `PyPI web site `_\n\n* `Documentation Wiki `_\n\n* `Early Overview Video `_", "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/MakerReduxCorp/PLOD/wiki", "keywords": "lists dictionaries", "license": "MIT", "maintainer": "Maker Redux Corporation", "maintainer_email": "johnd at makerredux com", "name": "PLOD", "package_url": "https://pypi.org/project/PLOD/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PLOD/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/MakerReduxCorp/PLOD/wiki" }, "release_url": "https://pypi.org/project/PLOD/0.1.7/", "requires_dist": null, "requires_python": null, "summary": "a simpler and easier way to manipulate lists of dictionaries", "version": "0.1.7" }, "last_serial": 2488351, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "7d386f15913f8a3308df4b3189e0b4c3", "sha256": "237ff526d49cf67b98af38a84b8df66288e5a14cf0b5b7522e14d5879a5aaa56" }, "downloads": -1, "filename": "PLOD-0.1.4.zip", "has_sig": false, "md5_digest": "7d386f15913f8a3308df4b3189e0b4c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12775, "upload_time": "2014-07-09T18:07:07", "url": "https://files.pythonhosted.org/packages/1d/f7/f5fcf90ca2102c2bf2c3bfe0c4318f37ebe3b1bc9afa76df2490b676f8d1/PLOD-0.1.4.zip" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "fed3d63f403168d87e4000e09c2de832", "sha256": "b1aa3c9b9ddff314e4c3fc621d2cd7ea72270046dfb3ac062cf2e7d6111f4b0b" }, "downloads": -1, "filename": "PLOD-0.1.5.zip", "has_sig": false, "md5_digest": "fed3d63f403168d87e4000e09c2de832", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12856, "upload_time": "2015-03-10T17:54:57", "url": "https://files.pythonhosted.org/packages/19/e6/198964c2551765842a1f6650ca46d3a1e302c1cfe2cac0018964a1fc842b/PLOD-0.1.5.zip" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "65cbb42a92b0ac7bc4ed3b63e1913e82", "sha256": "2141de555282fdd6911b1292170bb28fb87800dfdce143f2d1f82287dd140957" }, "downloads": -1, "filename": "PLOD-0.1.6.zip", "has_sig": false, "md5_digest": "65cbb42a92b0ac7bc4ed3b63e1913e82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13099, "upload_time": "2015-04-08T19:14:42", "url": "https://files.pythonhosted.org/packages/88/54/d05ba984746b769cc49dcc9c99625ac31c3ca400c900c3e29fac1446469f/PLOD-0.1.6.zip" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "02faee12e538f22748ad4dc97f94eb63", "sha256": "5ed4f71aee6dfd7b22998b7f3e75ba38cfb155778d6a6c1b5934c47944f77a72" }, "downloads": -1, "filename": "PLOD-0.1.7.tar.gz", "has_sig": false, "md5_digest": "02faee12e538f22748ad4dc97f94eb63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12870, "upload_time": "2016-11-28T20:23:49", "url": "https://files.pythonhosted.org/packages/9e/e4/ee8d521393dc1dcc5d61adc31e8d281e0a890c0f54d57a98e09e39cdd508/PLOD-0.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "02faee12e538f22748ad4dc97f94eb63", "sha256": "5ed4f71aee6dfd7b22998b7f3e75ba38cfb155778d6a6c1b5934c47944f77a72" }, "downloads": -1, "filename": "PLOD-0.1.7.tar.gz", "has_sig": false, "md5_digest": "02faee12e538f22748ad4dc97f94eb63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12870, "upload_time": "2016-11-28T20:23:49", "url": "https://files.pythonhosted.org/packages/9e/e4/ee8d521393dc1dcc5d61adc31e8d281e0a890c0f54d57a98e09e39cdd508/PLOD-0.1.7.tar.gz" } ] }