{ "info": { "author": "Peter Teichman", "author_email": "pteichman@litl.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "Park is a persistent key-value API for Python with ordered traversal\nof keys. Both keys and values are binary safe. It's similar in use to\nLevelDB, but has no dependencies outside the Python standard library.\n\nIt is meant to be extremely easy to use and can scale to a few\ngigabytes of data. It allows you to be lazy until it doesn't meet your\nneeds. Use it until then.\n\nIt supports simple getting and setting of byte data:\n\n::\n\n >>> kv = park.SQLiteStore(\"numbers.park\")\n >>> kv.put(\"1\", \"one\")\n >>> kv.put(\"2\", \"two\")\n >>> kv.put(\"3\", \"three\")\n >>> kv.put(\"4\", \"four\")\n\n >>> kv.get(\"2\")\n 'two'\n\nBatched setting of data from an iterable:\n\n::\n\n >>> kv.put_many([(\"1\", \"one\"), (\"2\", \"two\"), (\"3\", \"three\")])\n\n >>> kv.get(\"3\")\n 'three'\n\nLexically ordered traversal of keys and items, with start and end\nsentinels (inclusive):\n\n::\n\n >>> kv.put(\"1\", \"one\")\n >>> kv.put(\"2\", \"two\")\n >>> kv.put(\"3\", \"three\")\n >>> kv.put(\"11\", \"eleven\")\n >>> kv.put(\"12\", \"twelve\")\n\n >>> list(kv.keys())\n ['1', '11', '12', '2', '3']\n\n >>> list(kv.keys(key_from=\"12\"))\n ['12', '2', '3']\n\n >>> list(kv.keys(key_from=\"12\", key_to=\"2\"))\n ['12', '2']\n\n >>> list(kv.items(key_from=\"12\"))\n [('12', 'twelve'), ('2', 'two'), ('3', 'three')]\n\nIteration over all keys or items with a given prefix:\n\n::\n\n >>> kv.put(\"pet/dog\", \"Canis lupus familiaris\")\n >>> kv.put(\"pet/cat\", \"Felis catus\")\n >>> kv.put(\"pet/wolf\", \"Canis lupus\")\n\n >>> list(kv.prefix_keys(\"pet/\"))\n ['pet/cat', 'pet/dog', 'pet/wolf']\n\n >>> list(kv.prefix_keys(\"pet/\", strip_prefix=True))\n ['cat', 'dog', 'wolf']\n\n >>> list(kv.prefix_items(\"pet/\", strip_prefix=True))\n [('cat', 'Felis catus'),\n ('dog', 'Canis lupus familiaris'),\n ('wolf', 'Canis lupus')]\n\nIt plays well with generators, so you can e.g. park all the counting\nnumbers (this will take a while):\n\n::\n\n def numbers():\n for num in itertools.count(1):\n key = value = str(num)\n yield key, value\n\n kv.put_many(numbers())\n\nOr recursively park a directory's contents (keyed by relative paths)\nfrom the local filesystem:\n\n::\n\n def file_item(filename):\n with open(filename, \"r\") as fd:\n return filename, fd.read()\n\n kv.put_many(file_item(os.path.join(root, name))\n for root, dirs, files in os.walk(directory)\n for name in files)\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/litl/park", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "park", "package_url": "https://pypi.org/project/park/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/park/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/litl/park" }, "release_url": "https://pypi.org/project/park/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A key-value store with ordered traversal of keys", "version": "1.0.0" }, "last_serial": 738999, "releases": { "0.9.0": [ { "comment_text": "", "digests": { "md5": "4129e8e3583be6e3c6b2e602806c7980", "sha256": "7782be060a1758edbbe98de2709edb2a11daf852df9259303f821e785f8aa895" }, "downloads": -1, "filename": "park-0.9.0.tar.gz", "has_sig": false, "md5_digest": "4129e8e3583be6e3c6b2e602806c7980", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7091, "upload_time": "2012-09-05T20:07:03", "url": "https://files.pythonhosted.org/packages/21/b6/aad457890c8e4d36f49171aa5adfd3ea477e9365af97084787c7958e85a0/park-0.9.0.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "e5fb92d973f54aba965e1bb0dde7f10c", "sha256": "6da1d3523686bbdea654c7c468bd48ef6ea2570ce3b07459e39b2e6034fa9217" }, "downloads": -1, "filename": "park-0.9.1.tar.gz", "has_sig": false, "md5_digest": "e5fb92d973f54aba965e1bb0dde7f10c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7159, "upload_time": "2012-09-05T20:45:57", "url": "https://files.pythonhosted.org/packages/ff/b6/f5a0c2165db00a78c0d35ec6d28e36fa14320757b3faa195584ae2ce8f45/park-0.9.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "a363de426068e86107ae91eb02865363", "sha256": "49a44d3647d05fee2f245804f36d04afd74de8038c7d3765e9e00cc832b6a6e5" }, "downloads": -1, "filename": "park-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a363de426068e86107ae91eb02865363", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7168, "upload_time": "2012-09-06T12:46:04", "url": "https://files.pythonhosted.org/packages/8b/8d/41c6649a652813b859daa50ca192f5b37a23ac9729f2107facd378cba725/park-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a363de426068e86107ae91eb02865363", "sha256": "49a44d3647d05fee2f245804f36d04afd74de8038c7d3765e9e00cc832b6a6e5" }, "downloads": -1, "filename": "park-1.0.0.tar.gz", "has_sig": false, "md5_digest": "a363de426068e86107ae91eb02865363", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7168, "upload_time": "2012-09-06T12:46:04", "url": "https://files.pythonhosted.org/packages/8b/8d/41c6649a652813b859daa50ca192f5b37a23ac9729f2107facd378cba725/park-1.0.0.tar.gz" } ] }