Metadata-Version: 2.4
Name: anzu_workers
Version: 0.1.2
Summary: A package for updating queue items in a Django service
Home-page: https://github.com/yourusername/queue_updater
Author: Your Name
Author-email: Your Name <your.email@example.com>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/queue_updater
Project-URL: Bug Tracker, https://github.com/yourusername/queue_updater/issues
Keywords: django,queue,update
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Requires-Dist: aiohttp>=3.7.3
Requires-Dist: python-socketio>=5.12.1
Provides-Extra: langfuse
Requires-Dist: langfuse>=2.0.0; extra == "langfuse"
Provides-Extra: dev
Requires-Dist: pytest>=6.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: isort>=5.0.0; extra == "dev"
Requires-Dist: mypy>=0.900; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# Queue Updater

A simple Python package for updating queue items in a Django service.

## Installation

```bash
pip install anzu_worker
```

## Usage

### Using the QueueClient class (recommended)

```python
from anzu_workers import QueueClient

# Initialize with explicit parameters
client = QueueClient(
    django_url="https://your-django-service.com",
    username="admin",
    password="password",
    service_endpoint="/api/queue/"
)

# Update a queue item
client.update_queue_item(
    qi_hash="abc123",
    status="completed",
    data={"result": "success"}
)

# Or initialize using environment variables
import os
os.environ["DJANGO_URL"] = "https://your-django-service.com"
os.environ["DJANGO_SUPERUSER_USERNAME"] = "admin"
os.environ["DJANGO_SUPERUSER_PASSWORD"] = "password"
os.environ["SERVICE_ENDPOINT"] = "/api/queue/"

client = QueueClient()
client.update_queue_item("abc123", "completed")
```

### Using the legacy function (for backward compatibility)

```python
import os
from anzu_worker import update_queue_item

# Set required environment variables
os.environ["DJANGO_URL"] = "https://your-django-service.com"
os.environ["DJANGO_SUPERUSER_USERNAME"] = "admin"
os.environ["DJANGO_SUPERUSER_PASSWORD"] = "password"
os.environ["SERVICE_ENDPOINT"] = "/api/queue/"

# Update a queue item
update_queue_item(
    qi_hash="abc123",
    status="completed",
    data={"result": "success"}
)
```

## Environment Variables

- `DJANGO_URL`: URL of the Django service
- `DJANGO_SUPERUSER_USERNAME`: Django superuser username
- `DJANGO_SUPERUSER_PASSWORD`: Django superuser password
- `SERVICE_ENDPOINT`: Service endpoint (defaults to '/')

## License

MIT
