{ "info": { "author": "Fahri Reza", "author_email": "dozymoe@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "PyCircularBuffer\n================\n\n* License : MIT\n\nSummary\n-------\n\nSimple `circular buffer `_\nwritten in python extension.\n\nCircularBuffer will allocate requested size + 2 bytes for two sections of null\nterminated strings.\n\nMay temporary allocate another half of the allocated bytes if you used buffer\nprotocol, I mostly used them for regex.\n\n\nInstallation\n------------\n\nSimply `pip install pycircularbuffer`, compilation from downloaded source\nis probably needed.\n\n\nUsing\n-----\n\n.. code-block:: python\n\n from circularbuffer import CircularBuffer\n\n buf = CircularBuffer(1024)\n\n buf.write(b'some text')\n while len(buf) > 0:\n buf.read(1)\n\n from re import match\n\n buf.write(b'hallo')\n\n # python2\n with buf:\n match_found = match(br'^ha', buf)\n\n # python3\n match_found = match(br'^ha', buf)\n\n # use `result` immediately because regex didn't make memory copy of the\n # internal buffer, or run another `match()` on a memory copy, for example:\n\n match_found_str = buf.read(len(match_found.group(0)))\n independent_match_found = match(br'^ha', match_found_str)\n\n\nWarning\n-------\n\nDon't to this in python 3: `'a' in buf`, instead: `b'a' in buf`.\n\n\nAPI\n---\n\nRegular methods:\n^^^^^^^^^^^^^^^^\n* clear()\n* read()\n* resize()\n* write()\n* write_available()\n* make_contiguous()\n\nString methods:\n^^^^^^^^^^^^^^^\n* count()\n* startswith()\n* find()\n* index()\n\nSequence methods:\n^^^^^^^^^^^^^^^^^\n* __contains__()\n* __getitem__()\n* __len__()\n* __setitem__()\n\nMagic methods:\n^^^^^^^^^^^^^^\n* __repr__()\n* __str__()\n\n Note: while string representation makes thing easier it always creates\n memory copy.\n\n* __enter__()\n* __exit__()\n\nBuffer protocol:\n^^^^^^^^^^^^^^^^\nNote: for python version < 3, you need to use context manager, the `with`\nstatement, to let CircularBuffer know when you are releasing the buffer.\n\nUsing buffer protocol will throw `ReservedError` exception for\n`CircularBuffer.read()`.\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/dozymoe/PyCircularBuffer/tarball/0.0.8", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dozymoe/PyCircularBuffer", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pycircularbuffer", "package_url": "https://pypi.org/project/pycircularbuffer/", "platform": "any", "project_url": "https://pypi.org/project/pycircularbuffer/", "project_urls": { "Download": "https://github.com/dozymoe/PyCircularBuffer/tarball/0.0.8", "Homepage": "https://github.com/dozymoe/PyCircularBuffer" }, "release_url": "https://pypi.org/project/pycircularbuffer/0.0.8/", "requires_dist": null, "requires_python": null, "summary": "Simple implementation of circular buffer.", "version": "0.0.8" }, "last_serial": 2561032, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "a2137aa1a27ae223044e357849958b97", "sha256": "61ff02c4a0e5472824a95a19f9417c3c70e78167d67e714eb0660bb76764d580" }, "downloads": -1, "filename": "pycircularbuffer-0.0.1.tar.gz", "has_sig": true, "md5_digest": "a2137aa1a27ae223044e357849958b97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3653, "upload_time": "2016-09-09T19:13:25", "url": "https://files.pythonhosted.org/packages/ef/c6/1169f816b9d88b0693c30535d64c95489708b32b1089843d5eea24301c92/pycircularbuffer-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "b188a41875eb6f85e0440d5b1966c7b1", "sha256": "b147d3d955171a573a40c0997db87f9976c6147bb255165bae5e347dd7bcd448" }, "downloads": -1, "filename": "pycircularbuffer-0.0.2.tar.gz", "has_sig": true, "md5_digest": "b188a41875eb6f85e0440d5b1966c7b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4322, "upload_time": "2016-09-13T23:04:05", "url": "https://files.pythonhosted.org/packages/02/e1/9c916748da8e0d18948d1bb2250c3c1095fb9453529da798d0791db6182e/pycircularbuffer-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "066175eeeefb6bb88b35a23f6753d043", "sha256": "47387b9ea81a8dabfd38b0c62e20853738179f00154623f6bfb2b28e8769f723" }, "downloads": -1, "filename": "pycircularbuffer-0.0.3.tar.gz", "has_sig": true, "md5_digest": "066175eeeefb6bb88b35a23f6753d043", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4570, "upload_time": "2016-09-14T09:57:12", "url": "https://files.pythonhosted.org/packages/2a/4d/2cdb4d4c786ff587e11c6769af8039fe09a94697aac94dec6d391a274102/pycircularbuffer-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "5096a4c550c24d37ab40c495b2da6f21", "sha256": "5bd08c9f3d5b961fd522c8f4a148578f08519e76d7f24b45d0f60787728c946d" }, "downloads": -1, "filename": "pycircularbuffer-0.0.4.tar.gz", "has_sig": true, "md5_digest": "5096a4c550c24d37ab40c495b2da6f21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7991, "upload_time": "2016-09-25T14:25:43", "url": "https://files.pythonhosted.org/packages/41/1e/ca0c5d4a40e1da99f39eb2da19b55510a472b9ddfce95386c028f7669ba1/pycircularbuffer-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "9c3fc57b95a3c924bbce3b2e3d865cef", "sha256": "d3496b10229caa6bf1d9bfca459a9eebf55a60643f53e88e22bc0f67de5035f0" }, "downloads": -1, "filename": "pycircularbuffer-0.0.5.tar.gz", "has_sig": true, "md5_digest": "9c3fc57b95a3c924bbce3b2e3d865cef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9073, "upload_time": "2016-09-26T22:45:54", "url": "https://files.pythonhosted.org/packages/ea/6e/0e6dd8752fbb589a3c247dc5e8a93e207e99eaf9aa940757d60da6ef89a1/pycircularbuffer-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "05a24f990579fb4fcdddbd8b2bbc69df", "sha256": "0d3baced28f89c90b50414fffdf4d67ae7dc51004e053c8937b32ee27858c139" }, "downloads": -1, "filename": "pycircularbuffer-0.0.6.tar.gz", "has_sig": true, "md5_digest": "05a24f990579fb4fcdddbd8b2bbc69df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9025, "upload_time": "2016-09-27T11:05:53", "url": "https://files.pythonhosted.org/packages/0f/bb/adcf0484c3ffcce03e72dedf57156644f78e1f0054136c167690659cc2b2/pycircularbuffer-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "62615e30d5c9280c1b5879d4a119f37a", "sha256": "32b42a76cebd6a87167b77d0b613da34a66b79cbdc9f3592bf8077e19236d153" }, "downloads": -1, "filename": "pycircularbuffer-0.0.7.tar.gz", "has_sig": false, "md5_digest": "62615e30d5c9280c1b5879d4a119f37a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9998, "upload_time": "2017-01-08T10:23:00", "url": "https://files.pythonhosted.org/packages/97/77/651890ea240cfbae5ad8fe80753d99f87773fd4672c096707f1469ad7708/pycircularbuffer-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "ab3172d190f5109c14eed9b1c760727e", "sha256": "d56fd8a6d99bfd96b6b25188f1c32239f7909fc9153ad154f3f88629ef101867" }, "downloads": -1, "filename": "pycircularbuffer-0.0.8.tar.gz", "has_sig": true, "md5_digest": "ab3172d190f5109c14eed9b1c760727e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10060, "upload_time": "2017-01-08T19:54:07", "url": "https://files.pythonhosted.org/packages/c5/00/1ec783f418d86feff9c6fc0895d6742ea4fe004eca4706a61da8f74cf2a8/pycircularbuffer-0.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ab3172d190f5109c14eed9b1c760727e", "sha256": "d56fd8a6d99bfd96b6b25188f1c32239f7909fc9153ad154f3f88629ef101867" }, "downloads": -1, "filename": "pycircularbuffer-0.0.8.tar.gz", "has_sig": true, "md5_digest": "ab3172d190f5109c14eed9b1c760727e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10060, "upload_time": "2017-01-08T19:54:07", "url": "https://files.pythonhosted.org/packages/c5/00/1ec783f418d86feff9c6fc0895d6742ea4fe004eca4706a61da8f74cf2a8/pycircularbuffer-0.0.8.tar.gz" } ] }