circular-buffer-0.2.0
توضیحات
Efficient circular buffer implementation in Python with optional Numba JIT compilation
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | circular-buffer-0.2.0 |
| نام | circular-buffer |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jan Škoda |
| ایمیل نویسنده | skoda@jskoda.cz |
| آدرس صفحه اصلی | https://github.com/leftys/circular-buffer |
| آدرس اینترنتی | https://pypi.org/project/circular-buffer/ |
| مجوز | MIT |
circular-buffer
===============
|Tests| |PyPi|
Efficient circular buffer implementation in Python with optional Numba JIT compilation
Usage
-----
.. code-block:: python
import circular_buffer
buffer_of_int_type = circular_buffer.for_instances_like(123)
buf = buffer_of_int_type(size = 10, autoexpand = True)
for i in range(12):
buf.push_back(i)
assert buf.pop_front() == 0
assert buf.front() == 1
assert buf.back() == 11
Remember to install `numba` JIT compiler package to get a small extra speedup. `numba` can be
automatically installed if you install this package via :code:`pip install circular-buffer[numba]`.
.. |Tests| image:: https://github.com/leftys/circular-buffer/workflows/Tests/badge.svg
.. |PyPi| image:: https://badge.fury.io/py/circular-buffer.svg
:target: https://pypi.python.org/pypi/circular-buffer/
نحوه نصب
نصب پکیج whl circular-buffer-0.2.0:
pip install circular-buffer-0.2.0.whl
نصب پکیج tar.gz circular-buffer-0.2.0:
pip install circular-buffer-0.2.0.tar.gz