Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asyncgui/asynckivy-ext-queue
Queue (fifo, lifo, priority)
https://github.com/asyncgui/asynckivy-ext-queue
asynckivy kivy
Last synced: 22 days ago
JSON representation
Queue (fifo, lifo, priority)
- Host: GitHub
- URL: https://github.com/asyncgui/asynckivy-ext-queue
- Owner: asyncgui
- License: mit
- Created: 2023-10-25T11:41:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-07T02:49:23.000Z (11 months ago)
- Last Synced: 2024-10-01T08:24:04.566Z (about 1 month ago)
- Topics: asynckivy, kivy
- Language: Python
- Homepage: https://asyncgui.github.io/asynckivy-ext-queue/
- Size: 470 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Queue
Extension for `asynckivy` programs.
```python
from kivy.app import App
import asynckivy as ak
from asynckivy_ext.queue import Queueasync def producer(q):
for c in "ABC":
await q.put(c)
print('produced', c)
q.half_close()async def consumer(q):
async for c in q:
print('consumed', c)q = Queue(capacity=1)
ak.start(producer(q))
ak.start(consumer(q))
App().run()
``````text
produced A
consumed A
produced B
consumed B
produced C
consumed C
```## Installation
It's recommended to pin the minor version, because if it changed, it means some *important* breaking changes occurred.
```text
poetry add asynckivy-ext-queue@~0.2
pip install "asynckivy-ext-queue>=0.2,<0.3"
```## Tested on
- CPython 3.9 + Kivy 2.2.1
- CPython 3.10 + Kivy 2.2.1
- CPython 3.11 + Kivy 2.2.1