{ "info": { "author": "Aaron Iles", "author_email": "aaron.iles@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "prefixtree\n==========\n\nThis package provides ``PrefixDict``, a dictionary like object, and\n``PrefixSet``, set like object, that are implemented using using `prefix\ntrees`_, or tries. Using tries provides the following unique features when\ncompared to the builtin dict and set objects.\n\n* Keys are returned in sorted order.\n* Slice operations for getting, setting and deleting values.\n\nTrie based collections are useful when ordered access to key and values is a\nrequirement.\n\nUsage\n-----\n\n``PrefixDict`` and ``PrefixSet`` behave like the builtin dict and set objects.\nThey are implementations of the ``MutableMapping`` and ``MutableSet`` `abstract\nbase classes`. They also support the same constructors as the builtins. ::\n\n >>> from prefixtree import PrefixDict\n >>> pd = PrefixDict(a=0, b=1)\n >>> pd['c'] = 2\n >>> 'a' in pd\n True\n >>> 'd' in pd\n False\n\nThe only incompatible API difference between *prefixtree* collections and the\nbuiltins is that ``PrefixDict`` and ``PrefixSet`` only support strings as keys.\nUnicode strings will be encoded to byte strings before and after use.\n\nUnlike the bultins, it's possible to use slices when getting, setting and\ndeleting values from *prefixtree* collecionts. ::\n\n >>> list(pd['a':'c'])\n [0, 1, 2]\n >>> pd[:'b'] = [4, 3]\n >>> list(pd['a':'c':-1])\n [2, 3, 4]\n\n``PrefixDict`` also has additional methods not present on builtin ``dicts``.\n\n* ``commonprefix(key)``, to find the longest comment prefix with current keys.\n* ``startswith(prefix)``, iterates over current keys with matching prefix.\n\nRefer to the full *prefixtree* documentation on `Read The Docs`_ for details.\n\nCompatability\n-------------\n\n``prefixtree`` is implemented to be compatible with Python 2.x and Python 3.x.\nIt has been tested against the following Python implementations:\n\n* CPython 2.6\n* CPython 2.7\n* CPython 3.2\n* PyPy 1.9.0\n\nContinuous integration testing is provided by `Travis CI`_.\n\nIssues\n------\n\nSource code for ``prefixtree`` is hosted on `GitHub`_. Any bug reports or\nfeature requests can be made using GitHub's `issues system`_.\n\n|build_status|\n\nFurther Reading\n---------------\n\nFull documentation for *prefixtree* is hosted by `Read The Docs`_.\n\n.. _GitHub: https://github.com/provoke-vagueness/prefixtree\n.. _Read The Docs: http://prefixtree.readthedocs.org/\n.. _Travis CI: http://travis-ci.org/\n.. _abstract base classes: http://docs.python.org/py3k/library/collections.html#abcs-abstract-base-classes\n.. _issues system: https://github.com/provoke-vagueness/prefixtree/issues\n.. _prefix trees: http://en.wikipedia.org/wiki/Trie\n\n.. |build_status| image:: https://secure.travis-ci.org/provoke-vagueness/prefixtree.png?branch=master\n :target: http://travis-ci.org/#!/provoke-vagueness/prefixtree", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://prefixtree.readthedocs.org", "keywords": null, "license": "ASL", "maintainer": null, "maintainer_email": null, "name": "prefixtree", "package_url": "https://pypi.org/project/prefixtree/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/prefixtree/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://prefixtree.readthedocs.org" }, "release_url": "https://pypi.org/project/prefixtree/0.2/", "requires_dist": null, "requires_python": null, "summary": "Python dictionary and set implemented using prefix trees", "version": "0.2" }, "last_serial": 639002, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "79a6ac95844670cd1eca35bc3511b688", "sha256": "455df6c2e6c8aed8c9a13f2918d10b703bb83f364d771b36208374692024309d" }, "downloads": -1, "filename": "prefixtree-0.1.tar.gz", "has_sig": false, "md5_digest": "79a6ac95844670cd1eca35bc3511b688", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20842, "upload_time": "2012-09-17T12:37:46", "url": "https://files.pythonhosted.org/packages/d9/8f/46c04dabe20c23f97270a7fa1f20db40d2532e7d610aeb5cf4f272123a2d/prefixtree-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "fdeae4935baeef81e47ee21059521993", "sha256": "3c012520d21dd39685cc13f11461d42a32b67d18ba80fccaac8252cc2d22e283" }, "downloads": -1, "filename": "prefixtree-0.2.tar.gz", "has_sig": false, "md5_digest": "fdeae4935baeef81e47ee21059521993", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 580034, "upload_time": "2012-10-30T22:32:31", "url": "https://files.pythonhosted.org/packages/28/c0/90789ffd3fef08972f28ab385ee16a59c30bb08e212bb2c5c16a04d33ff6/prefixtree-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fdeae4935baeef81e47ee21059521993", "sha256": "3c012520d21dd39685cc13f11461d42a32b67d18ba80fccaac8252cc2d22e283" }, "downloads": -1, "filename": "prefixtree-0.2.tar.gz", "has_sig": false, "md5_digest": "fdeae4935baeef81e47ee21059521993", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 580034, "upload_time": "2012-10-30T22:32:31", "url": "https://files.pythonhosted.org/packages/28/c0/90789ffd3fef08972f28ab385ee16a59c30bb08e212bb2c5c16a04d33ff6/prefixtree-0.2.tar.gz" } ] }