{ "info": { "author": "Daniel Paz Avalos", "author_email": "me@dpazavalos.dev", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5" ], "description": "# HeaderIndexer\nA system to bind aliases to indexes of headers in a matrix. \n\nGiven a dict of header aliases paired to the actual header value (or an iterable of possible values)\ncreates a dict with entries {'alias': column_index} \n\nIncludes interactive prompts to manually select headers when unable to find, and optional duplicate\nchecks for aliases sharing indexes\n\n## Installation\n```\npip install headerindexer\n```\n\n## Using HeaderIndexer\n ```python\nfrom headerindexer import HI\nindexer = HI()\nheaders = [\"Date\", \"OS\", \"TrackingID\", \"DNSHostname\", b\"DNSHostname\", 77]\naliases = {\n b'hostname': [\"DNSHostname\", b'DNSHostname'],\n \"track\": (\"1TrackingID1\", 'TrackingID'),\n \"OS\": \"OperatingSystem\",\n 7: 77\n}\naliases_to_indexes = indexer.run(headers, aliases)\n\n```\n\nAssume we've extracted a row of headers from a spreadsheet. Create a dictionary like aliases, and \npass them both to indexer (HI.run()) \n\n```python\n# aliases_to_indexes, generated above\n{b'hostname': 3, 'track': 2, 'OS': 1, 7: 5}\n```\nThe returned dictionary can be used to reliably call on the appropriate column by given aliases\n\n### Headers not found/Duplicates headers\n\nBy default, when an alias' header cannot be located headerindexer will prompt the user to manually \nselect from a list of all headers, one by one\n\nAdditionally HI.allow_duplicates can be set to False in or after init, enabling a similar mode of \nprompting whenever two or more aliases share the same index value \n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dpazavalos/headerindexer", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "headerindexer", "package_url": "https://pypi.org/project/headerindexer/", "platform": "", "project_url": "https://pypi.org/project/headerindexer/", "project_urls": { "Homepage": "https://github.com/dpazavalos/headerindexer" }, "release_url": "https://pypi.org/project/headerindexer/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "A system to bind aliases to indexes of headers in a matrix", "version": "0.1.5" }, "last_serial": 4994327, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6227bbc9b8c4d9f359beb9d5e41604e5", "sha256": "7c30f69a640557bace7eb90102b6007ed7edf5cace608c7c68901ea8daaa72e7" }, "downloads": -1, "filename": "headerindexer-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6227bbc9b8c4d9f359beb9d5e41604e5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21865, "upload_time": "2019-02-17T00:31:24", "url": "https://files.pythonhosted.org/packages/b6/c1/1380990eb8fcc8b63e707970ba45bb77115ce8bbbf2a12a28ab01c5ce26e/headerindexer-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "efcdcf40ccdb9556063e3edb10eae6ce", "sha256": "5a9c78c20cce9ed4190ec160ac210e56728af97fef250dfa57b19681cbf38a0c" }, "downloads": -1, "filename": "headerindexer-0.1.0.tar.gz", "has_sig": false, "md5_digest": "efcdcf40ccdb9556063e3edb10eae6ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12298, "upload_time": "2019-02-17T00:31:26", "url": "https://files.pythonhosted.org/packages/50/6b/42d8a331ed2763eb59863428eedd524d7d2480776c24cb87fba6178c7318/headerindexer-0.1.0.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "171cfdc1fbc936d8195acb62085ad016", "sha256": "eaeac2ff21cda352ed21d60b0a51f3d5716672ebf262a92a8be7fdbbacd3ddbe" }, "downloads": -1, "filename": "headerindexer-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "171cfdc1fbc936d8195acb62085ad016", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19770, "upload_time": "2019-03-27T18:50:31", "url": "https://files.pythonhosted.org/packages/79/36/19455afff86fe2f226405444041a05110403608fbd60faf8a15177cc1568/headerindexer-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5936177fca1bcee2da936e0e0ce0ba35", "sha256": "93ea5509df82deae1a6acb49f70b94d7703e70cffb88b3b4df27450ce0a295ba" }, "downloads": -1, "filename": "headerindexer-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5936177fca1bcee2da936e0e0ce0ba35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11119, "upload_time": "2019-03-27T18:50:33", "url": "https://files.pythonhosted.org/packages/70/34/ddb0a60f1c9c69acf95ac04dd1b14f3f4f2a4db10c8842688701d9d033df/headerindexer-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "171cfdc1fbc936d8195acb62085ad016", "sha256": "eaeac2ff21cda352ed21d60b0a51f3d5716672ebf262a92a8be7fdbbacd3ddbe" }, "downloads": -1, "filename": "headerindexer-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "171cfdc1fbc936d8195acb62085ad016", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 19770, "upload_time": "2019-03-27T18:50:31", "url": "https://files.pythonhosted.org/packages/79/36/19455afff86fe2f226405444041a05110403608fbd60faf8a15177cc1568/headerindexer-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5936177fca1bcee2da936e0e0ce0ba35", "sha256": "93ea5509df82deae1a6acb49f70b94d7703e70cffb88b3b4df27450ce0a295ba" }, "downloads": -1, "filename": "headerindexer-0.1.5.tar.gz", "has_sig": false, "md5_digest": "5936177fca1bcee2da936e0e0ce0ba35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11119, "upload_time": "2019-03-27T18:50:33", "url": "https://files.pythonhosted.org/packages/70/34/ddb0a60f1c9c69acf95ac04dd1b14f3f4f2a4db10c8842688701d9d033df/headerindexer-0.1.5.tar.gz" } ] }