anzu 0.1.2__tar.gz

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-0.1.2/LICENSE ADDED
File without changes
anzu-0.1.2/PKG-INFO ADDED
@@ -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
anzu-0.1.2/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # Queue Updater
2
+
3
+ A simple Python package for updating queue items in a Django service.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install anzu
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Using the QueueClient class (recommended)
14
+
15
+ ```python
16
+ from anzu import QueueClient
17
+
18
+ # Initialize with explicit parameters
19
+ client = QueueClient(
20
+ django_url="https://your-django-service.com",
21
+ username="admin",
22
+ password="password",
23
+ service_endpoint="/api/queue/"
24
+ )
25
+
26
+ # Update a queue item
27
+ client.update_queue_item(
28
+ qi_hash="abc123",
29
+ status="completed",
30
+ data={"result": "success"}
31
+ )
32
+
33
+ # Or initialize using environment variables
34
+ import os
35
+ os.environ["DJANGO_URL"] = "https://your-django-service.com"
36
+ os.environ["DJANGO_SUPERUSER_USERNAME"] = "admin"
37
+ os.environ["DJANGO_SUPERUSER_PASSWORD"] = "password"
38
+ os.environ["SERVICE_ENDPOINT"] = "/api/queue/"
39
+
40
+ client = QueueClient()
41
+ client.update_queue_item("abc123", "completed")
42
+ ```
43
+
44
+ ### Using the legacy function (for backward compatibility)
45
+
46
+ ```python
47
+ import os
48
+ from anzu import update_queue_item
49
+
50
+ # Set required environment variables
51
+ os.environ["DJANGO_URL"] = "https://your-django-service.com"
52
+ os.environ["DJANGO_SUPERUSER_USERNAME"] = "admin"
53
+ os.environ["DJANGO_SUPERUSER_PASSWORD"] = "password"
54
+ os.environ["SERVICE_ENDPOINT"] = "/api/queue/"
55
+
56
+ # Update a queue item
57
+ update_queue_item(
58
+ qi_hash="abc123",
59
+ status="completed",
60
+ data={"result": "success"}
61
+ )
62
+ ```
63
+
64
+ ## Environment Variables
65
+
66
+ - `DJANGO_URL`: URL of the Django service
67
+ - `DJANGO_SUPERUSER_USERNAME`: Django superuser username
68
+ - `DJANGO_SUPERUSER_PASSWORD`: Django superuser password
69
+ - `SERVICE_ENDPOINT`: Service endpoint (defaults to '/')
70
+
71
+ ## License
72
+
73
+ MIT
@@ -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,10 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ setup.py
5
+ anzu/__init__.py
6
+ anzu.egg-info/PKG-INFO
7
+ anzu.egg-info/SOURCES.txt
8
+ anzu.egg-info/dependency_links.txt
9
+ anzu.egg-info/requires.txt
10
+ anzu.egg-info/top_level.txt
@@ -0,0 +1,13 @@
1
+ requests>=2.25.0
2
+ aiohttp>=3.7.3
3
+ python-socketio>=5.12.1
4
+
5
+ [dev]
6
+ pytest>=6.0.0
7
+ black>=22.0.0
8
+ isort>=5.0.0
9
+ mypy>=0.900
10
+ flake8>=4.0.0
11
+
12
+ [langfuse]
13
+ langfuse>=2.0.0
@@ -0,0 +1 @@
1
+ anzu
@@ -0,0 +1,61 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "anzu"
7
+ version = "0.1.2"
8
+ description = "A package for updating queue items in a Django service"
9
+ readme = "README.md"
10
+ authors = [
11
+ {name = "Your Name", email = "your.email@example.com"}
12
+ ]
13
+ license = {text = "MIT"}
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Operating System :: OS Independent",
18
+ ]
19
+ keywords = ["django", "queue", "update"]
20
+ dependencies = [
21
+ "requests>=2.25.0",
22
+ "aiohttp>=3.7.3",
23
+ "python-socketio>=5.12.1"
24
+ ]
25
+ requires-python = ">=3.6"
26
+
27
+ [project.optional-dependencies]
28
+ langfuse = ["langfuse>=2.0.0"]
29
+ dev = [
30
+ "pytest>=6.0.0",
31
+ "black>=22.0.0",
32
+ "isort>=5.0.0",
33
+ "mypy>=0.900",
34
+ "flake8>=4.0.0",
35
+ ]
36
+
37
+ [project.urls]
38
+ "Homepage" = "https://github.com/yourusername/queue_updater"
39
+ "Bug Tracker" = "https://github.com/yourusername/queue_updater/issues"
40
+
41
+ [tool.setuptools]
42
+ packages = ["anzu"]
43
+
44
+ [tool.black]
45
+ line-length = 88
46
+ target-version = ["py36", "py37", "py38", "py39", "py310"]
47
+
48
+ [tool.isort]
49
+ profile = "black"
50
+ line_length = 88
51
+
52
+ [tool.mypy]
53
+ python_version = "3.6"
54
+ warn_return_any = true
55
+ warn_unused_configs = true
56
+ disallow_untyped_defs = true
57
+ disallow_incomplete_defs = true
58
+
59
+ [tool.pytest.ini_options]
60
+ testpaths = ["tests"]
61
+ python_files = "test_*.py"
anzu-0.1.2/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
anzu-0.1.2/setup.py ADDED
@@ -0,0 +1,27 @@
1
+ import setuptools
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ setuptools.setup(
7
+ name="anzu",
8
+ version="0.1.2",
9
+ author="Your Name",
10
+ author_email="your.email@example.com",
11
+ description="A package for updating queue items in a Django service",
12
+ long_description=long_description,
13
+ long_description_content_type="text/markdown",
14
+ url="https://github.com/yourusername/queue_updater",
15
+ packages=setuptools.find_packages(),
16
+ classifiers=[
17
+ "Programming Language :: Python :: 3",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ ],
21
+ python_requires=">=3.6",
22
+ install_requires=[
23
+ "requests>=2.25.0",
24
+ "aiohttp>=3.7.3",
25
+ "python-socketio>=5.12.1",
26
+ ],
27
+ )