{ "info": { "author": "Dmitry Olshansky", "author_email": "dmitry@olshansky.me", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "## HL - a simple flexible fuzzy host search/execute\n\nHL (Host List) provides omni-box style query interface (inspired by next to any modern browser).\nHL uses easy to understand weighted fuzzy-matching over hierarchical host lists. Things considered in full-text matching process are project name, env (prod, qa, dev, etc.), tags, ports and FQDN itself.\n\nNote that what defines project name, or environment, etc. is your own arbitrary convention and they all work the same in HL.\nIn reality, HL accepts any hierarchical classification with each level considered as a tag. Upper classification tags have proportionally more weight then any other below, this property is used to disambiguate fuzzy string matches.\n\n## Installation \n\n```sh\npip install --user hl\n```\n\n## Example\n\nImaginary config for simple project with API and DBs, having 2 environments - staging on AWS and production on bare metal in 2 DCs. Note that admins are funky and DB have their own unique and inconsistent names + different ports, that we want to classify properly our with tags.\n\n\n```yml\n# our-project.yml:\n---\nprod:\n api:\n us-east-dc:\n hosts: api-[0-4]-east-prod.our-company.cloud\n ports:\n http: 8080\n us-west-dc:\n hosts: api-[0-4]-west-prod.our-company.cloud\n ports:\n http: 8080\n db:\n us-east-dc:\n # list of host patterns is acceptable\n hosts:\n - ricky-the-great.our-company.cloud\n - mikky-the-malicious.our-company.cloud\n ports:\n postgres: 5432\n us-east-dc:\n # list of different host entries as well\n - hosts: east-mcgram-db.our-company.cloud\n ports:\n postgres: 5432\n - hosts: east-paul-db.our-company.cloud\n ports:\n postgres: 6432\nqa:\n aws:\n api:\n hosts: api-[0-4]-aws-staging.ec2.cloud\n ports:\n http: 8080\n db:\n hosts: db-aws-staging.ec2.cloud\n ports:\n postgres: 5432\n\n```\n\nEnter `hl` tool:\n```bash\nhl aws\n\n```\n\n## Algorithm\n\nAlgorithm is simple (subject to change) - first we traverse the graph of host patterns and consider each tag as a token inversly weighted by depth (the deeper, the less weight). Then we apply sensible tokenization of hostname (split by '-', '_' and '.'), each token gets minimal weight. The result is then merged tags and hostname tokens.\n\nQuery is tokenized in the same way as hostnames. After that the two frequency dictionaries are multipled like sparse vectors, to minimize sharp effect of repeated words, weights in query is smoothed by sigmoid (this will likely change in the future).\n\nNext step is to use trigramms or similar to fix typos in query and still find closest token to match.", "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/pypa/example-project", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "hl", "package_url": "https://pypi.org/project/hl/", "platform": "", "project_url": "https://pypi.org/project/hl/", "project_urls": { "Homepage": "https://github.com/pypa/example-project" }, "release_url": "https://pypi.org/project/hl/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "HL - Host List, a simple flexible fuzzy search/execute tool for lists of hosts", "version": "0.2.0" }, "last_serial": 5608412, "releases": { "0.1.10": [ { "comment_text": "", "digests": { "md5": "dba54c131c256404ed9f22b6af18fd2e", "sha256": "768148d025e0e846d7783a9cc329cf8d3dce7f259bba0e965c60e6079b9c8b35" }, "downloads": -1, "filename": "hl-0.1.10-py3-none-any.whl", "has_sig": false, "md5_digest": "dba54c131c256404ed9f22b6af18fd2e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6028, "upload_time": "2018-06-04T15:05:48", "url": "https://files.pythonhosted.org/packages/ad/c8/dc3741e6093f455819c9944dc142fb40290bedc9d31131e5c05210e37fac/hl-0.1.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0c2322a5279dd539e243cd43a8e77da2", "sha256": "161f2733e8002712ff21bab7f15772fa66f45d4aed899aa480f6b959a2157b49" }, "downloads": -1, "filename": "hl-0.1.10.tar.gz", "has_sig": false, "md5_digest": "0c2322a5279dd539e243cd43a8e77da2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5522, "upload_time": "2018-06-04T15:05:48", "url": "https://files.pythonhosted.org/packages/98/41/0810dc17f2998d5f1b855404e638f04e25a1e6a420b25e3ecee73c412344/hl-0.1.10.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c18fe9ff8fb7d7cd2c39418c96e0bd8e", "sha256": "2197fa60b89daff9ca405e78738aa30a256fa52877cdd0b63700cd6cf8722a9d" }, "downloads": -1, "filename": "hl-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c18fe9ff8fb7d7cd2c39418c96e0bd8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6871, "upload_time": "2019-07-30T15:41:28", "url": "https://files.pythonhosted.org/packages/93/83/2640f9f45e0a280ef183176647f421403e6b7aa6d5f69b79dd75d976143c/hl-0.2.0.tar.gz" } ], "0.2.0a0": [ { "comment_text": "", "digests": { "md5": "f2396e7ad6dfcb8734aeecda93949aa4", "sha256": "ed31457fcb464c7adf739fe1398b94e4a24b7e3c914790339c9361f7fe845098" }, "downloads": -1, "filename": "hl-0.2.0a0-py3-none-any.whl", "has_sig": false, "md5_digest": "f2396e7ad6dfcb8734aeecda93949aa4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8289, "upload_time": "2019-07-30T15:32:22", "url": "https://files.pythonhosted.org/packages/4d/64/b772560d7e7808e4c57374cccc5a5fbbeed4a885b46369ceb4b4150f9697/hl-0.2.0a0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "494f6909de40b697845c17a2c18f71e4", "sha256": "9cc391d694f47d095e075c85b5282ca8b547df790e325ae01795da6fdd9f6cd4" }, "downloads": -1, "filename": "hl-0.2.0a0.tar.gz", "has_sig": false, "md5_digest": "494f6909de40b697845c17a2c18f71e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6871, "upload_time": "2019-07-30T15:32:23", "url": "https://files.pythonhosted.org/packages/33/43/ec8958d3e5a50299fa31e7faa825cf7bd95ca0e1f89beef33ce31dbe182f/hl-0.2.0a0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c18fe9ff8fb7d7cd2c39418c96e0bd8e", "sha256": "2197fa60b89daff9ca405e78738aa30a256fa52877cdd0b63700cd6cf8722a9d" }, "downloads": -1, "filename": "hl-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c18fe9ff8fb7d7cd2c39418c96e0bd8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6871, "upload_time": "2019-07-30T15:41:28", "url": "https://files.pythonhosted.org/packages/93/83/2640f9f45e0a280ef183176647f421403e6b7aa6d5f69b79dd75d976143c/hl-0.2.0.tar.gz" } ] }