{ "info": { "author": "Anton Dries", "author_email": "anton.dries@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "`mkdict`: a multi-key dictionary\n================================\n\nUsage\n-----\n\nThe ``mkdict.MultiKeyDict`` provides a multiple keyed dictionary.\n\nWhen adding an element you can specify a tuple of keys:\n\n``` python\nd = MultiKeyDict()\n\nd[1,2,3] = 123\nd[1,2,4] = 124\nd[2,3,4] = 234\nd[3,3,4] = 334\n```\nAll keys should have the same length otherwise a `KeyError` will be raised. \n\nTo retrieve values you can use `None` as a wildcard character.\n``` python\nd[1,2,3] -> 123\nd[1,None,None] -> {(2,3): 123, (2,4): 124}\nd[1,None,3] -> {(2,): 123}\n```\nWhen a wildcard is used the dictionary returns a new view on the dictionary with that key eliminated. \nWhen no wildcard is used the result is a single item.\n\nModifications of the resulting dictionary will update the parent dictionary.\nFor example,\n``` python\nd[2,None,None][4,5] = 245\n```\nwill add the value 245 with key (2, 4, 5) in the original dictionary.\n\nLicense\n-------\n\nMIT License\n\nCopyright (c) 2019 Anton Dries\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "mkdict", "package_url": "https://pypi.org/project/mkdict/", "platform": "", "project_url": "https://pypi.org/project/mkdict/", "project_urls": null, "release_url": "https://pypi.org/project/mkdict/1.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "A multi-key dictionary with wildcard lookup.", "version": "1.0" }, "last_serial": 4924510, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "8e3298ad77ad7f71885e89fb025e23e2", "sha256": "293cf8e491d13a959bc4b1d304b5750edbad32c6841899b8b140d889130da1d2" }, "downloads": -1, "filename": "mkdict-1.0.tar.gz", "has_sig": false, "md5_digest": "8e3298ad77ad7f71885e89fb025e23e2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3787, "upload_time": "2019-03-11T10:54:07", "url": "https://files.pythonhosted.org/packages/9f/bf/671a52f356e12221a84030a792ea9caa22c37445df2fae624ce5fdac7299/mkdict-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8e3298ad77ad7f71885e89fb025e23e2", "sha256": "293cf8e491d13a959bc4b1d304b5750edbad32c6841899b8b140d889130da1d2" }, "downloads": -1, "filename": "mkdict-1.0.tar.gz", "has_sig": false, "md5_digest": "8e3298ad77ad7f71885e89fb025e23e2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3787, "upload_time": "2019-03-11T10:54:07", "url": "https://files.pythonhosted.org/packages/9f/bf/671a52f356e12221a84030a792ea9caa22c37445df2fae624ce5fdac7299/mkdict-1.0.tar.gz" } ] }