{ "info": { "author": "Oliver Steele", "author_email": "steele@osteele.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Minimal Keys\n============\n\n|PyPI version| |Doc Status| |License| |Supported Python|\n\nCompute the minimal keys for a collection of strings or sequences. This is\nintended for use in presenting data in a user interface.\n\nFor example, the minimal keys of ``[\"assignments/alice/hw1.txt\",\n\"assignments/bob/hw1.txt\"]`` are ``[\"alice\", \"bob\"]``.\n\nThe minimal keys of ``[\"alice/assignments/hw1.txt\", \"bob/assignments/hw1.txt\"]``\nare also ``[\"alice\", \"bob\"]``.\n\nFinally, the minimal keys of ``[\"assignments/alice.txt\",\n\"assignments/bob.txt\"]`` are\u2014wait for it\u2014``[\"alice\", \"bob\"]``.\n\nThis is the same basic idea as a database superkey_, except that the actual\nminimal unique keys are returned, instead of the attributes that select these\nkeys.\n\nThe current implementation trims only the beginnings and ends of sequences,\nbecause this is all that I've needed so far. I have in my head a more\nsophisticated implementation that uses `difflib`, but it is too long to fit in\nthe header of this README.\n\nInstall\n-------\n\n.. code:: bash\n\n $ pip install minimalkeys\n\nUsage\n-----\n\n.. code:: python\n\n >>> from minimalkeys import minimalkeys\n >>> minimal_keys([\"assignments/alice/hw1.txt\", \"assignments/bob/hw1.txt\"])\n ['alice', 'bob']\n\n\nLicense\n-------\n\nMIT\n\n.. |PyPI version| image:: https://img.shields.io/pypi/v/minimalkeys.svg\n :target: https://pypi.python.org/pypi/minimalkeys\n :alt: Latest PyPI Version\n.. |Doc Status| image:: https://readthedocs.org/projects/minimal-keys/badge/?version=latest\n :target: http://minimal-keys.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. |License| image:: https://img.shields.io/pypi/l/minimal-keys.svg\n :target: https://pypi.python.org/pypi/minimal-keys\n :alt: License\n.. |Supported Python| image:: https://img.shields.io/pypi/pyversions/minimal-keys.svg\n :target: https://pypi.python.org/pypi/minimal-keys\n :alt: Supported Python Versions\n\n.. _superkey: https://en.wikipedia.org/wiki/Superkey\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/osteele/minimal-keys", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "minimalkeys", "package_url": "https://pypi.org/project/minimalkeys/", "platform": "", "project_url": "https://pypi.org/project/minimalkeys/", "project_urls": { "Homepage": "https://github.com/osteele/minimal-keys" }, "release_url": "https://pypi.org/project/minimalkeys/0.1.0/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Compute the minimal keys for a collection of strings or sequences.", "version": "0.1.0" }, "last_serial": 3471562, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4d59384fc9d0f31781e05f393c496edd", "sha256": "6a154df20d4195bdae1d3d939fadeadc30f323d3b02d42ee54569eb58dbc5d72" }, "downloads": -1, "filename": "minimalkeys-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4d59384fc9d0f31781e05f393c496edd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5608, "upload_time": "2018-01-08T16:16:15", "url": "https://files.pythonhosted.org/packages/e0/db/e7035fe83b0ffd50209489dd3dded5f63a309796be7acf0484b2ffefe907/minimalkeys-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dd6d54ef0a8bb2c5667f3bfa7bb29296", "sha256": "4db6acff83c61393ab1502f2d472e743b8524ec837f28f6b16c660de75abe730" }, "downloads": -1, "filename": "minimalkeys-0.1.0.tar.gz", "has_sig": false, "md5_digest": "dd6d54ef0a8bb2c5667f3bfa7bb29296", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 7006, "upload_time": "2018-01-08T16:16:18", "url": "https://files.pythonhosted.org/packages/71/59/05e32b2cf8804e65d59288bb0239738a9bc182aa620f1704e31ca3511987/minimalkeys-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4d59384fc9d0f31781e05f393c496edd", "sha256": "6a154df20d4195bdae1d3d939fadeadc30f323d3b02d42ee54569eb58dbc5d72" }, "downloads": -1, "filename": "minimalkeys-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4d59384fc9d0f31781e05f393c496edd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5608, "upload_time": "2018-01-08T16:16:15", "url": "https://files.pythonhosted.org/packages/e0/db/e7035fe83b0ffd50209489dd3dded5f63a309796be7acf0484b2ffefe907/minimalkeys-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dd6d54ef0a8bb2c5667f3bfa7bb29296", "sha256": "4db6acff83c61393ab1502f2d472e743b8524ec837f28f6b16c660de75abe730" }, "downloads": -1, "filename": "minimalkeys-0.1.0.tar.gz", "has_sig": false, "md5_digest": "dd6d54ef0a8bb2c5667f3bfa7bb29296", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 7006, "upload_time": "2018-01-08T16:16:18", "url": "https://files.pythonhosted.org/packages/71/59/05e32b2cf8804e65d59288bb0239738a9bc182aa620f1704e31ca3511987/minimalkeys-0.1.0.tar.gz" } ] }