queus 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Queue/__init__.py +21 -0
- Queue/exceptions/__init__.py +3 -0
- Queue/exceptions/exceptions.py +8 -0
- Queue/functions/__init__.py +2 -0
- Queue/functions/function01.py +39 -0
- queus-0.0.1.dist-info/METADATA +49 -0
- queus-0.0.1.dist-info/RECORD +9 -0
- queus-0.0.1.dist-info/WHEEL +5 -0
- queus-0.0.1.dist-info/top_level.txt +1 -0
Queue/__init__.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
appname = 'queus'
|
|
2
|
+
version = '0.0.1'
|
|
3
|
+
pythons = '~=3.10'
|
|
4
|
+
clinton = 'Clinton Abraham'
|
|
5
|
+
mention = ['queue', 'queues', 'telegrams']
|
|
6
|
+
profile = 'https://github.com/Clinton-Abraham'
|
|
7
|
+
|
|
8
|
+
DATA03 = 'Python queue'
|
|
9
|
+
DATA01 = "clintonabrahamc@gmail.com"
|
|
10
|
+
DATA02 = ['Natural Language :: English',
|
|
11
|
+
'Intended Audience :: Developers',
|
|
12
|
+
'Operating System :: OS Independent',
|
|
13
|
+
'Programming Language :: Python :: 3.10',
|
|
14
|
+
'Programming Language :: Python :: 3.11',
|
|
15
|
+
'Programming Language :: Python :: 3.12',
|
|
16
|
+
'Programming Language :: Python :: 3.13',
|
|
17
|
+
'Programming Language :: Python :: 3.14',
|
|
18
|
+
'Topic :: Software Development :: Libraries',
|
|
19
|
+
'Topic :: Software Development :: Localization',
|
|
20
|
+
'Topic :: Software Development :: User Interfaces',
|
|
21
|
+
'Topic :: Software Development :: Version Control',]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from ..exceptions import QueuedAlready
|
|
3
|
+
#======================================================================================
|
|
4
|
+
|
|
5
|
+
Queues = []
|
|
6
|
+
|
|
7
|
+
class Queue:
|
|
8
|
+
|
|
9
|
+
async def add(uid, storage=Queues):
|
|
10
|
+
if uid not in storage:
|
|
11
|
+
storage.append(uid)
|
|
12
|
+
else:
|
|
13
|
+
raise QueuedAlready("ALREADY ADDED TO QUEUE")
|
|
14
|
+
|
|
15
|
+
#======================================================================================
|
|
16
|
+
|
|
17
|
+
async def delete(uid, storage=Queues):
|
|
18
|
+
storage.remove(uid) if uid in storage else 0
|
|
19
|
+
|
|
20
|
+
async def position(uid, storage=Queues):
|
|
21
|
+
return storage.index(uid) if uid in storage else 0
|
|
22
|
+
|
|
23
|
+
#======================================================================================
|
|
24
|
+
|
|
25
|
+
async def queue(uid, wait=1, maximum=1, storage=Queues):
|
|
26
|
+
while uid in storage:
|
|
27
|
+
if storage.index(uid) + 1 > maximum:
|
|
28
|
+
await asyncio.sleep(wait)
|
|
29
|
+
else:
|
|
30
|
+
break
|
|
31
|
+
|
|
32
|
+
#======================================================================================
|
|
33
|
+
|
|
34
|
+
async def message(imog, text, button=None, maximum=1, storage=Queues):
|
|
35
|
+
if maximum < len(storage):
|
|
36
|
+
try: await imog.edit(text=text, reply_markup=button)
|
|
37
|
+
except Exception: pass
|
|
38
|
+
|
|
39
|
+
#======================================================================================
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: queus
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Python queue
|
|
5
|
+
Home-page: https://github.com/Clinton-Abraham
|
|
6
|
+
Author: Clinton Abraham
|
|
7
|
+
Author-email: clintonabrahamc@gmail.com
|
|
8
|
+
Keywords: queue,queues,telegrams
|
|
9
|
+
Classifier: Natural Language :: English
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
18
|
+
Classifier: Topic :: Software Development :: Localization
|
|
19
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
20
|
+
Classifier: Topic :: Software Development :: Version Control
|
|
21
|
+
Requires-Python: ~=3.10
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
Dynamic: author
|
|
24
|
+
Dynamic: author-email
|
|
25
|
+
Dynamic: classifier
|
|
26
|
+
Dynamic: description
|
|
27
|
+
Dynamic: description-content-type
|
|
28
|
+
Dynamic: home-page
|
|
29
|
+
Dynamic: keywords
|
|
30
|
+
Dynamic: requires-python
|
|
31
|
+
Dynamic: summary
|
|
32
|
+
|
|
33
|
+
<p align="center">
|
|
34
|
+
📦 <a href="https://pypi.org/project/Queue" style="text-decoration:none;">QUEUE</a>
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<a href="https://telegram.me/Space_x_bots"><img src="https://img.shields.io/badge/Sᴘᴀᴄᴇ 𝕩 ʙᴏᴛꜱ-30302f?style=flat&logo=telegram" alt="telegram badge"/></a>
|
|
39
|
+
<a href="https://telegram.me/clinton_abraham"><img src="https://img.shields.io/badge/Cʟɪɴᴛᴏɴ Aʙʀᴀʜᴀᴍ-30302f?style=flat&logo=telegram" alt="telegram badge"/></a>
|
|
40
|
+
<a href="https://telegram.me/sources_codes"><img src="https://img.shields.io/badge/Sᴏᴜʀᴄᴇ ᴄᴏᴅᴇꜱ-30302f?style=flat&logo=telegram" alt="telegram badge"/></a>
|
|
41
|
+
</p>
|
|
42
|
+
|
|
43
|
+
## USAGE
|
|
44
|
+
<details>
|
|
45
|
+
<summary>Installation</summary>
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install queue
|
|
49
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Queue/__init__.py,sha256=rP6UZyCeTJ0oOLhsbiBWj-9VycYGOVNWF_22NL0YQe8,869
|
|
2
|
+
Queue/exceptions/__init__.py,sha256=F0Y9nEtTIUF9tUp9KCnOjIg-dHS5BmxODy0pGOAy4Ic,106
|
|
3
|
+
Queue/exceptions/exceptions.py,sha256=xRy-gk1CGp1K-B6OOWY_-CwV1LspBEkcSBC5fZ62bMw,117
|
|
4
|
+
Queue/functions/__init__.py,sha256=vk_3G9hXJei6CEmPtY0MPL2riSwpTUh6YgULBKaugjM,61
|
|
5
|
+
Queue/functions/function01.py,sha256=UboUgXtDc7NPm5Lv_TzpnjKZ78BgYkCxgneXlaU0ctk,1337
|
|
6
|
+
queus-0.0.1.dist-info/METADATA,sha256=j9Wsvz_DlOVCkiHL4IKrr4z8fmfcMu-LAZrQ2mqLPIs,1853
|
|
7
|
+
queus-0.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
queus-0.0.1.dist-info/top_level.txt,sha256=XAdzZwMRIIT6NjaczMWWceutZm5KjlUOpcIsBpZN7X8,6
|
|
9
|
+
queus-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Queue
|