{ "info": { "author": "James Dominy", "author_email": "jgdominy+pyringbuf@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: C", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": "=========\npyringbuf\n=========\n\nA python extension implementing a circular/ring buffer of characters as a C\nextension. It overwrites silently.\n\nAvailability\n------------\n\nCurrently, pyringbuf is available at https://pypi.python.org/pypi/pyringbuf,\nor via ``pip install pyringbuf``. As this is a C extension, there is a\ncompilation step, so your system will need to be able to compile extension\nmodules for python.\n\nUsage\n-----\n\n::\n\n >>> from ringbuf import RingBuffer\n >>> R = RingBuffer(5) #choose your buffer size\n >>> R.push(\"a\") #push a single character into the buffer\n >>> R.pop() #pop a single character\n 'a'\n >>> R.write(\"bcdef\") #fill buffer with many characters at once\n >>> R.read(4) #read many characters at once\n 'bcde'\n >>> R.read(1)\n 'f'\n >>> R.read(1) #returns an empty string if the buffer is empty \n ''\n\nImplementation\n--------------\n\nFor the interested, this has been implemented as a pure C extension. The ring\nbuffer itself is implemented as a fixed length array of chars (8-bit signed),\ndynamically allocated on the Python Heap on instantiation of a buffer. Read and\nwrite indexes both increase monotonically, and addresses in the array are\ndetermined using *index* % (modulo) *buffer size*. Writing more than the buffer\nsize at once throws an exception, otherwise if writing overtakes the read\nindex in the modulo space the buffer contents are silently overwritten.\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/sirlark/pyringbuf", "keywords": "circular ring buffer", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pyringbuf", "package_url": "https://pypi.org/project/pyringbuf/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyringbuf/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/sirlark/pyringbuf" }, "release_url": "https://pypi.org/project/pyringbuf/0.1b2/", "requires_dist": null, "requires_python": null, "summary": "A circular/ring buffer written in C", "version": "0.1b2" }, "last_serial": 1535737, "releases": { "0.1b0": [], "0.1b1": [ { "comment_text": "", "digests": { "md5": "d99ae1f7df2bc5918aca6d58d221b579", "sha256": "28753cf05a5c82fa2193340e5f095cc077b40eb62aa04866f7c1db3ead3af345" }, "downloads": -1, "filename": "pyringbuf-0.1b1.tar.gz", "has_sig": false, "md5_digest": "d99ae1f7df2bc5918aca6d58d221b579", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3691, "upload_time": "2015-04-17T10:18:34", "url": "https://files.pythonhosted.org/packages/da/1e/defdf7856219c305de4969baa757a62d57ddcab2773e4edbefee545f9fc9/pyringbuf-0.1b1.tar.gz" } ], "0.1b2": [ { "comment_text": "", "digests": { "md5": "22487cce4b31ff9cf71d95a5c85b9ead", "sha256": "a93f14be50f0b5320bc6a2281ee2c4f2193171aef7be14dbe5635bbc84aa98fb" }, "downloads": -1, "filename": "pyringbuf-0.1b2.tar.gz", "has_sig": false, "md5_digest": "22487cce4b31ff9cf71d95a5c85b9ead", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3705, "upload_time": "2015-05-06T14:41:36", "url": "https://files.pythonhosted.org/packages/14/13/c1f4a8442b8f01383dd7dabd1f3bc41ab6aa1df4fcacf5f9fee25dad40a5/pyringbuf-0.1b2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "22487cce4b31ff9cf71d95a5c85b9ead", "sha256": "a93f14be50f0b5320bc6a2281ee2c4f2193171aef7be14dbe5635bbc84aa98fb" }, "downloads": -1, "filename": "pyringbuf-0.1b2.tar.gz", "has_sig": false, "md5_digest": "22487cce4b31ff9cf71d95a5c85b9ead", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3705, "upload_time": "2015-05-06T14:41:36", "url": "https://files.pythonhosted.org/packages/14/13/c1f4a8442b8f01383dd7dabd1f3bc41ab6aa1df4fcacf5f9fee25dad40a5/pyringbuf-0.1b2.tar.gz" } ] }