{ "info": { "author": "Pedro Lopes", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "Copyright (c) 2016, Pedro Lopes\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\nDescription: Compressed Deque\n ================\n \n A deque which compresses its items for a decreased volatile and persistent memory footprint.\n \n Installation\n ------------\n \n .. code-block:: bash\n \n $ pip install compressed-deque\n \n \n How to Use it\n -------------\n \n .. code-block:: python\n \n from compdeque import CompressedDeque\n \n # Instantiate the Deque\n collection = CompressedDeque()\n \n # Use it as a normal deque\n collection.append(1)\n \n # Persist to a file\n CompressedDeque.save_to_file(collection, file_path=\"/path/to/collection.dat\")\n \n # ...\n \n # and load it when you need it later\n loaded_collection = CompressedDeque.load_from_file(\"/path/to/collection.dat\")\n \n Tests and documentation\n -----------------------\n \n On the project's root folder:\n \n .. code-block:: bash\n \n # Run all tests\n $ make test\n \n # Generate documentation\n $ make docs\n \n Structure\n ---------\n \n Compressed Deque inherits from `deque `_ and stores its items as zlib compressed pickles. The middle pickle layer only serves as a generic serialization method which can provide a serialized object string for zlib to compress. Although pickle can compress objects, its compression rate does not match zlib's, even using `higher protocols `_.\n \n .. image:: docs/images/value_layers.png\n \n ``save_to_file()`` and ``load_from_file()`` static methods are provided to persist the collection directly into disk in its compressed representation, without much overhead.\n \n The persisted file contains a sequence of header/compressed_value pairs: the header is a 4 byte integer description of the compressed value's length and the compressed value is similiar to its in-memory representation.\n \n .. image:: docs/images/persisted_values.png\nKeywords: compressed deque zipped zlib\nPlatform: UNKNOWN\nClassifier: Development Status :: 3 - Alpha\nClassifier: Intended Audience :: Developers\nClassifier: Topic :: Software Development :: Build Tools\nClassifier: License :: OSI Approved :: MIT License\nClassifier: Programming Language :: Python :: 2\nClassifier: Programming Language :: Python :: 2.6\nClassifier: Programming Language :: Python :: 2.7", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lopespm/compressed-deque", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "compressed-deque", "package_url": "https://pypi.org/project/compressed-deque/", "platform": null, "project_url": "https://pypi.org/project/compressed-deque/", "project_urls": { "Homepage": "https://github.com/lopespm/compressed-deque" }, "release_url": "https://pypi.org/project/compressed-deque/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Compressed Deque", "version": "0.1.2" }, "last_serial": 2311895, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "6b88aec46f88fda12e1a66e0592e4a52", "sha256": "e8d9302299157cbad38f7447eef87e70897430409eab6c4eb204ed2b96f6f0f3" }, "downloads": -1, "filename": "compressed_deque-0.1.2-py2-none-any.whl", "has_sig": false, "md5_digest": "6b88aec46f88fda12e1a66e0592e4a52", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6722, "upload_time": "2016-08-29T20:20:28", "url": "https://files.pythonhosted.org/packages/92/c3/915102fb2f8c43da0011554cd5a61d66f9e72ecac403f1e031464966b3ed/compressed_deque-0.1.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d9357b31280a98cb3caf0e26136363c", "sha256": "66c2797ce0f2a88d2f50a420ada62fb53807a6c478e37d032f333a680c98a0bd" }, "downloads": -1, "filename": "compressed-deque-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7d9357b31280a98cb3caf0e26136363c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3304, "upload_time": "2016-08-29T20:20:30", "url": "https://files.pythonhosted.org/packages/dd/ba/de44964159d64e588ba3b6f266917ecd4f9499fc74e7697593a6499e2b13/compressed-deque-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6b88aec46f88fda12e1a66e0592e4a52", "sha256": "e8d9302299157cbad38f7447eef87e70897430409eab6c4eb204ed2b96f6f0f3" }, "downloads": -1, "filename": "compressed_deque-0.1.2-py2-none-any.whl", "has_sig": false, "md5_digest": "6b88aec46f88fda12e1a66e0592e4a52", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6722, "upload_time": "2016-08-29T20:20:28", "url": "https://files.pythonhosted.org/packages/92/c3/915102fb2f8c43da0011554cd5a61d66f9e72ecac403f1e031464966b3ed/compressed_deque-0.1.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7d9357b31280a98cb3caf0e26136363c", "sha256": "66c2797ce0f2a88d2f50a420ada62fb53807a6c478e37d032f333a680c98a0bd" }, "downloads": -1, "filename": "compressed-deque-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7d9357b31280a98cb3caf0e26136363c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3304, "upload_time": "2016-08-29T20:20:30", "url": "https://files.pythonhosted.org/packages/dd/ba/de44964159d64e588ba3b6f266917ecd4f9499fc74e7697593a6499e2b13/compressed-deque-0.1.2.tar.gz" } ] }