anzu 0.1.2__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.
anzu/__init__.py ADDED
@@ -0,0 +1,7 @@
1
+ from anzu.worker.client import update_queue_item
2
+ from anzu.worker.constants import PROCESSING, WAITING, FAILURE, SUCCESS
3
+ from anzu.logger import logger, redis_logger, AnzuLogger
4
+ from anzu.websocket import send_socket_response, emit_socket_event
5
+
6
+ __version__ = '0.1.2'
7
+ __all__ = ['update_queue_item', 'SUCCESS', 'PROCESSING', 'FAILURE', 'WAITING', 'logger', 'redis_logger', 'AnzuLogger', 'emit_socket_event', 'send_socket_response']
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: anzu
3
+ Version: 0.1.2
4
+ Summary: A package for updating queue items in a Django service
5
+ Home-page: https://github.com/yourusername/queue_updater
6
+ Author: Your Name
7
+ Author-email: Your Name <your.email@example.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/yourusername/queue_updater
10
+ Project-URL: Bug Tracker, https://github.com/yourusername/queue_updater/issues
11
+ Keywords: django,queue,update
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.6
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: requests>=2.25.0
19
+ Requires-Dist: aiohttp>=3.7.3
20
+ Requires-Dist: python-socketio>=5.12.1
21
+ Provides-Extra: langfuse
22
+ Requires-Dist: langfuse>=2.0.0; extra == "langfuse"
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest>=6.0.0; extra == "dev"
25
+ Requires-Dist: black>=22.0.0; extra == "dev"
26
+ Requires-Dist: isort>=5.0.0; extra == "dev"
27
+ Requires-Dist: mypy>=0.900; extra == "dev"
28
+ Requires-Dist: flake8>=4.0.0; extra == "dev"
29
+ Dynamic: author
30
+ Dynamic: home-page
31
+ Dynamic: license-file
32
+ Dynamic: requires-python
33
+
34
+ # Queue Updater
35
+
36
+ A simple Python package for updating queue items in a Django service.
37
+
38
+ ## Installation
39
+
40
+ ```bash
41
+ pip install anzu
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ ### Using the QueueClient class (recommended)
47
+
48
+ ```python
49
+ from anzu import QueueClient
50
+
51
+ # Initialize with explicit parameters
52
+ client = QueueClient(
53
+ django_url="https://your-django-service.com",
54
+ username="admin",
55
+ password="password",
56
+ service_endpoint="/api/queue/"
57
+ )
58
+
59
+ # Update a queue item
60
+ client.update_queue_item(
61
+ qi_hash="abc123",
62
+ status="completed",
63
+ data={"result": "success"}
64
+ )
65
+
66
+ # Or initialize using environment variables
67
+ import os
68
+ os.environ["DJANGO_URL"] = "https://your-django-service.com"
69
+ os.environ["DJANGO_SUPERUSER_USERNAME"] = "admin"
70
+ os.environ["DJANGO_SUPERUSER_PASSWORD"] = "password"
71
+ os.environ["SERVICE_ENDPOINT"] = "/api/queue/"
72
+
73
+ client = QueueClient()
74
+ client.update_queue_item("abc123", "completed")
75
+ ```
76
+
77
+ ### Using the legacy function (for backward compatibility)
78
+
79
+ ```python
80
+ import os
81
+ from anzu import update_queue_item
82
+
83
+ # Set required environment variables
84
+ os.environ["DJANGO_URL"] = "https://your-django-service.com"
85
+ os.environ["DJANGO_SUPERUSER_USERNAME"] = "admin"
86
+ os.environ["DJANGO_SUPERUSER_PASSWORD"] = "password"
87
+ os.environ["SERVICE_ENDPOINT"] = "/api/queue/"
88
+
89
+ # Update a queue item
90
+ update_queue_item(
91
+ qi_hash="abc123",
92
+ status="completed",
93
+ data={"result": "success"}
94
+ )
95
+ ```
96
+
97
+ ## Environment Variables
98
+
99
+ - `DJANGO_URL`: URL of the Django service
100
+ - `DJANGO_SUPERUSER_USERNAME`: Django superuser username
101
+ - `DJANGO_SUPERUSER_PASSWORD`: Django superuser password
102
+ - `SERVICE_ENDPOINT`: Service endpoint (defaults to '/')
103
+
104
+ ## License
105
+
106
+ MIT
@@ -0,0 +1,6 @@
1
+ anzu/__init__.py,sha256=Zd2HoYnABQPR6ggp7XYh4dUP9_nSImDlhVLpW8yuxQQ,431
2
+ anzu-0.1.2.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ anzu-0.1.2.dist-info/METADATA,sha256=RFpOSm3l4-LMkY21Fuz_aUl3bBbIJgb-TnpSVQh46Tg,2804
4
+ anzu-0.1.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
5
+ anzu-0.1.2.dist-info/top_level.txt,sha256=ScsUMREYhumuqwuPGmSlaT4aifa-g8khMiFr7-h-xQ0,5
6
+ anzu-0.1.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (78.1.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
File without changes
@@ -0,0 +1 @@
1
+ anzu