{"id":17987467,"url":"https://github.com/miili/ringnes","last_synced_at":"2026-05-17T03:40:27.470Z","repository":{"id":72852937,"uuid":"181346556","full_name":"miili/ringnes","owner":"miili","description":"Overwriting ring buffer for Python with continuous memory map","archived":false,"fork":false,"pushed_at":"2019-05-31T08:39:05.000Z","size":37,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-09T14:45:25.221Z","etag":null,"topics":["circular-buffer","python"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miili.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-14T17:43:59.000Z","updated_at":"2021-10-28T12:05:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"7cc6fa39-4688-4cf0-a0a0-bfb64d7becce","html_url":"https://github.com/miili/ringnes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miili%2Fringnes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miili%2Fringnes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miili%2Fringnes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miili%2Fringnes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miili","download_url":"https://codeload.github.com/miili/ringnes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247112771,"owners_count":20885606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circular-buffer","python"],"created_at":"2024-10-29T19:08:55.035Z","updated_at":"2025-10-27T07:16:18.721Z","avatar_url":"https://github.com/miili.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ringnes\n![Python3](https://img.shields.io/badge/python-3.5-brightgreen.svg)\n\n_Overwriting ringbuffer for Python_\n\nA simple overwriting ringbuffer for Python, providing a continous strip of virtual memory over the ring trough Python C-API using mmap black magic.\nThe `put` method is thread safe.\n\nMore from the ringnes brewery: https://ringnes.no/\n\n# ToDo\n\nA consumer `get` is not implemented at the moment. Please feel free to contribute!\n\n# Example\n\n```python\nfrom ringnes import Ringbuffer\nimport numpy as num\n\n# Capacity in bytes\ncap = 4096 * 100\nring = Ringbuffer(capacity=cap)\n\ndata = num.arange(1002, dtype=num.int32)\nfor _ in range(20):\n    ring.put(memoryview(data))\n\n\nreceive = num.frombuffer(ring, dtype=num.int32)[::-1]\n```\n\n# Installation\n\nPython development headers are required, that's it.\n\n```sh\nsudo apt-get install python3-dev\npip3 install git+https://github.com/miili/ringnes.git\n```\n\n\n# Resources\n\nhttps://nbviewer.jupyter.org/url/jakevdp.github.com/downloads/notebooks/BufferProtocol.ipynb\n\nhttps://lo.calho.st/quick-hacks/employing-black-magic-in-the-linux-page-table/\n\nhttps://github.com/le1ca/toy-queue/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiili%2Fringnes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiili%2Fringnes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiili%2Fringnes/lists"}