# Worker Backend Client (Python)
Auto-generated Python client library for the Mesh-Sync worker-backend.
## Installation
### From PyPI (public registry)
```bash
pip install mesh-sync-worker-backend-client
```
### From source (development)
```bash
# Clone the repository and navigate to the generated Python client
cd generated/python
# Install in editable mode
pip install -e .
```
### From TestPyPI (testing)
```bash
pip install --index-url https://test.pypi.org/simple/ mesh-sync-worker-backend-client
```
### From GitHub Packages (Recommended for Private Access)
GitHub Packages provides package hosting with access control based on repository permissions.
**Prerequisites:**
- GitHub Personal Access Token (PAT) with `read:packages` scope
- Repository access (for private packages)
**Installation Steps:**
1. Generate a GitHub Personal Access Token:
- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Generate new token with `read:packages` scope
- Copy the token
2. Install with GitHub authentication:
```bash
pip install mesh-sync-worker-backend-client \
--index-url https://your_github_username:ghp_your_token@maven.pkg.github.com/Mesh-Sync/worker-backend/simple/
```
3. Or configure `~/.pypirc` for persistent authentication:
```ini
[distutils]
index-servers =
github
[github]
repository = https://maven.pkg.github.com/Mesh-Sync/worker-backend
username = your_github_username
password = ghp_your_personal_access_token
```
Then install normally:
```bash
pip install mesh-sync-worker-backend-client
```
**Access Control:** Only users with read access to the repository can install private packages from GitHub Packages.
### From a private PyPI registry
Configure your `pip.conf` or `~/.pypirc`:
**For pip.conf (Linux/Mac: `~/.config/pip/pip.conf`, Windows: `%APPDATA%\pip\pip.ini`):**
```ini
[global]
index-url = https://your-registry.example.com/simple
```
**For authentication with .pypirc (`~/.pypirc`):**
```ini
[distutils]
index-servers =
private
[private]
repository = https://your-registry.example.com
username = your_username
password = your_password
```
Then install:
```bash
pip install mesh-sync-worker-backend-client
```
## Usage
### Basic Example
```python
from worker_client import WorkerClient
# Initialize client
client = WorkerClient(
base_url='http://localhost:3000',
api_key='your_api_key', # Optional
timeout=30 # Optional, default 30s
)
# Type-safe method call
job = client.file_download_request({
'url': 'https://example.com/file.pdf',
'destination': '/downloads/file.pdf'
})
print(f'Job created: {job.job_id}')
# Check job status
status = client.get_job_status(job.job_id)
print(f'Job state: {status.state}')
# Close the client session
client.close()
```
### Using Context Manager
```python
from worker_client import WorkerClient
with WorkerClient(base_url='http://localhost:3000') as client:
job = client.file_download_request({
'url': 'https://example.com/file.pdf',
'destination': '/downloads/file.pdf'
})
print(f'Job ID: {job.job_id}')
```
### Using Message Type Constants
```python
from worker_client import WorkerClient, MessageTypes
client = WorkerClient(base_url='http://localhost:3000')
# Dynamic message type
job = client.send_to_queue(MessageTypes.FILE_DOWNLOAD_REQUEST, {
'url': 'https://example.com/file.pdf',
'destination': '/downloads/file.pdf'
})
```
## Available Message Types
### file-download-request
**Description:** Handles file download requests.
**Method:** `client.file_download_request(data)`
**Payload Type:** `FileDownloadRequestMessage`
**Fields:**
- `modelId` (string) [✓]: The unique identifier for the model to be downloaded.
- `storageLocation` (object) [✓]: The storage location of the model.
### model-discovery-folder-processed-event
**Description:** Handles model discovery folder processed events.
**Method:** `client.model_discovery_folder_processed_event(data)`
**Payload Type:** `ModelDiscoveryFolderProcessedEventMessage`
**Fields:**
- `connectionId` (string) [✓]: The unique identifier for the connection.
- `folderPath` (string) [✓]: The path to the processed folder.
- `discoveredFiles` (array) [✓]: A list of files discovered in the folder.
- `folderSignature` (object) [✗]: A signature representing the state of the folder.
- `processedAt` (string) [✓]: The timestamp when the folder was processed.
- `statistics` (object) [✓]: Statistics about the processed folder.
### model-discovery-scan-found-event
**Description:** Handles model discovery scan found events.
**Method:** `client.model_discovery_scan_found_event(data)`
**Payload Type:** `ModelDiscoveryScanFoundEventMessage`
**Fields:**
- `modelId` (string) [✓]: The unique identifier for the model.
- `name` (string) [✓]: The name of the model.
- `fileName` (string) [✓]: The name of the model file.
- `description` (string) [✓]: A description of the model.
- `fileTypes` (array) [✓]: An array of file types associated with the model.
- `size` (number) [✓]: The size of the model file in bytes.
- `storageLocation` (object) [✓]: The storage location of the model.
- `providerType` (string) [✓]: The type of the storage provider.
- `metadata` (object) [✓]: A flexible object for additional metadata.
### model-discovery-scan-progress-event
**Description:** Handles model discovery scan progress events.
**Method:** `client.model_discovery_scan_progress_event(data)`
**Payload Type:** `ModelDiscoveryScanProgressEventMessage`
**Fields:**
- `payload` (object) [✓]: Contains the discovery scan progress details.
### model-discovery-scan-request
**Description:** Handles model discovery scan requests events.
**Method:** `client.model_discovery_scan_request(data)`
**Payload Type:** `ModelDiscoveryScanRequestMessage`
**Fields:**
- `libraryId` (string) [✓]: The ID of the library to scan.
### model-metadata-generation-completed
**Description:** Handles model metadata generation completed.
**Method:** `client.model_metadata_generation_completed(data)`
**Payload Type:** `ModelMetadataGenerationCompletedMessage`
**Fields:**
- `modelId` (string) [✗]: The unique identifier for the model.
- `metadata` (object) [✓]: The enriched metadata for the model.
### model-metadata-generation-request
**Description:** Handles model metadata generation requests.
**Method:** `client.model_metadata_generation_request(data)`
**Payload Type:** `ModelMetadataGenerationRequestMessage`
**Fields:**
- `modelId` (string) [✓]: The unique identifier for the model.
- `storageConnectionId` (string) [✓]: The ID of the storage connection.
- `filePath` (string) [✓]: The path to the model file.
- `fileName` (string) [✓]: The name of the model file.
- `fileSize` (number) [✓]: The size of the model file in bytes.
- `fileLastModified` (string) [✓]: The last modified date of the model file.
- `storageProviderType` (string) [✓]: The type of the storage provider.
- `modelThumbnailUrl` (string) [✗]: The URL of the model thumbnail.
- `metamodel` (object) [✗]: The metamodel of the model.
### model-metamodel-detection-found
**Description:** Handles model metamodel detection found.
**Method:** `client.model_metamodel_detection_found(data)`
**Payload Type:** `ModelMetamodelDetectionFoundMessage`
**Fields:**
- `suggestions` (array) [✗]: List of metamodel suggestions.
### model-metamodel-detection-request
**Description:** Handles model metamodel detection requests.
**Method:** `client.model_metamodel_detection_request(data)`
**Payload Type:** `ModelMetamodelDetectionRequestMessage`
**Fields:**
- `connectionId` (string) [✗]: The unique identifier for the storage connection.
- `folderPath` (string) [✗]: The path to the folder that was processed.
- `discoveredFiles` (array) [✗]: A list of files discovered in the folder.
- `folderSignature` (object) [✓]: A signature representing the state of the folder.
- `processedAt` (string) [✗]: The timestamp when the folder was processed.
- `statistics` (object) [✓]: Statistics about the processed folder.
### thumbnail-generation-completed
**Description:** Handles thumbnail generation completed.
**Method:** `client.thumbnail_generation_completed(data)`
**Payload Type:** `ThumbnailGenerationCompletedMessage`
**Fields:**
- `originalJobId` (string) [✓]: The ID of the original job that requested the thumbnail generation.
- `modelId` (string) [✓]: The ID of the model that the thumbnail was generated for.
- `status` (string) [✓]: The status of the thumbnail generation.
- `thumbnailPath` (string) [✗]: The path to the generated thumbnail.
- `errorMessage` (string) [✗]: An error message if the thumbnail generation failed.
- `storageLocation` (object) [✓]: The storage location of the model.
### thumbnail-generation-request
**Description:** Handles thumbnail generation requests.
**Method:** `client.thumbnail_generation_request(data)`
**Payload Type:** `ThumbnailGenerationRequestMessage`
**Fields:**
- `modelId` (string) [✓]: The unique identifier for the model requiring a thumbnail.
- `ownerId` (string) [✓]: The identifier of the user who owns the entity.
- `storageLocation` (object) [✓]: The storage location of the model.
- `previewType` (string) [✓]: The type of preview to generate, e.g., 'default', 'static', 'glb'.
## Configuration
### Environment Variables
You can use environment variables for configuration:
```python
import os
from worker_client import WorkerClient
client = WorkerClient(
base_url=os.getenv('WORKER_BACKEND_URL', 'http://localhost:3000'),
api_key=os.getenv('WORKER_BACKEND_API_KEY'),
timeout=int(os.getenv('WORKER_BACKEND_TIMEOUT', '30'))
)
```
Supported environment variables:
- `WORKER_BACKEND_URL`: Base URL of the worker backend
- `WORKER_BACKEND_API_KEY`: Optional API key for authentication
- `WORKER_BACKEND_TIMEOUT`: Request timeout in seconds
### Client Options
```python
class WorkerClient:
def __init__(
self,
base_url: str, # Required: Worker backend URL
api_key: Optional[str] = None, # Optional: API key
timeout: int = 30 # Optional: Request timeout in seconds
)
```
## API Reference
### `WorkerClient`
#### Methods
- `send_to_queue(message_type: str, payload: Dict[str, Any]) -> JobResponse`
- Send a job to the queue with the specified message type
- `get_job_status(job_id: str) -> JobStatus`
- Get the current status of a job
- `file_download_request(data: FileDownloadRequestMessage) -> JobResponse`
- Handles file download requests.
- `model_discovery_folder_processed_event(data: ModelDiscoveryFolderProcessedEventMessage) -> JobResponse`
- Handles model discovery folder processed events.
- `model_discovery_scan_found_event(data: ModelDiscoveryScanFoundEventMessage) -> JobResponse`
- Handles model discovery scan found events.
- `model_discovery_scan_progress_event(data: ModelDiscoveryScanProgressEventMessage) -> JobResponse`
- Handles model discovery scan progress events.
- `model_discovery_scan_request(data: ModelDiscoveryScanRequestMessage) -> JobResponse`
- Handles model discovery scan requests events.
- `model_metadata_generation_completed(data: ModelMetadataGenerationCompletedMessage) -> JobResponse`
- Handles model metadata generation completed.
- `model_metadata_generation_request(data: ModelMetadataGenerationRequestMessage) -> JobResponse`
- Handles model metadata generation requests.
- `model_metamodel_detection_found(data: ModelMetamodelDetectionFoundMessage) -> JobResponse`
- Handles model metamodel detection found.
- `model_metamodel_detection_request(data: ModelMetamodelDetectionRequestMessage) -> JobResponse`
- Handles model metamodel detection requests.
- `thumbnail_generation_completed(data: ThumbnailGenerationCompletedMessage) -> JobResponse`
- Handles thumbnail generation completed.
- `thumbnail_generation_request(data: ThumbnailGenerationRequestMessage) -> JobResponse`
- Handles thumbnail generation requests.
- `close() -> None`
- Close the HTTP session
#### Context Manager Support
The client supports the context manager protocol for automatic resource cleanup:
```python
with WorkerClient(base_url='...') as client:
# Use client
pass
# Session is automatically closed
```
### Response Types
#### `JobResponse`
```python
class JobResponse:
success: bool
job_id: str
message_name: str
queue: str
```
#### `JobStatus`
```python
class JobStatus:
job_id: str
name: str
queue: str
state: str # 'waiting' | 'active' | 'completed' | 'failed' | 'delayed'
data: Any
returnvalue: Optional[Any]
progress: Optional[int]
timestamp: int
```
## Docker Usage
A Dockerfile is included for containerized usage:
```bash
cd generated/python
docker build -t worker-client-python .
docker run -it --rm worker-client-python python
```
## License
ISC
Raw data
{
"_id": null,
"home_page": "https://github.com/Mesh-Sync/worker-backend",
"name": "mesh-sync-worker-backend-client",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "worker, job-queue, bullmq, client, mesh-sync",
"author": "Mesh-Sync",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/16/a3/b7705f25d23021a38569c064f54cbabd2a0c4a2fed71829933171f01005b/mesh_sync_worker_backend_client-1.0.0.tar.gz",
"platform": null,
"description": "# Worker Backend Client (Python)\n\nAuto-generated Python client library for the Mesh-Sync worker-backend.\n\n## Installation\n\n### From PyPI (public registry)\n\n```bash\npip install mesh-sync-worker-backend-client\n```\n\n### From source (development)\n\n```bash\n# Clone the repository and navigate to the generated Python client\ncd generated/python\n\n# Install in editable mode\npip install -e .\n```\n\n### From TestPyPI (testing)\n\n```bash\npip install --index-url https://test.pypi.org/simple/ mesh-sync-worker-backend-client\n```\n\n### From GitHub Packages (Recommended for Private Access)\n\nGitHub Packages provides package hosting with access control based on repository permissions.\n\n**Prerequisites:**\n- GitHub Personal Access Token (PAT) with `read:packages` scope\n- Repository access (for private packages)\n\n**Installation Steps:**\n\n1. Generate a GitHub Personal Access Token:\n - Go to GitHub Settings \u2192 Developer settings \u2192 Personal access tokens \u2192 Tokens (classic)\n - Generate new token with `read:packages` scope\n - Copy the token\n\n2. Install with GitHub authentication:\n\n```bash\npip install mesh-sync-worker-backend-client \\\n --index-url https://your_github_username:ghp_your_token@maven.pkg.github.com/Mesh-Sync/worker-backend/simple/\n```\n\n3. Or configure `~/.pypirc` for persistent authentication:\n\n```ini\n[distutils]\nindex-servers =\n github\n\n[github]\nrepository = https://maven.pkg.github.com/Mesh-Sync/worker-backend\nusername = your_github_username\npassword = ghp_your_personal_access_token\n```\n\nThen install normally:\n\n```bash\npip install mesh-sync-worker-backend-client\n```\n\n**Access Control:** Only users with read access to the repository can install private packages from GitHub Packages.\n\n### From a private PyPI registry\n\nConfigure your `pip.conf` or `~/.pypirc`:\n\n**For pip.conf (Linux/Mac: `~/.config/pip/pip.conf`, Windows: `%APPDATA%\\pip\\pip.ini`):**\n\n```ini\n[global]\nindex-url = https://your-registry.example.com/simple\n```\n\n**For authentication with .pypirc (`~/.pypirc`):**\n\n```ini\n[distutils]\nindex-servers =\n private\n\n[private]\nrepository = https://your-registry.example.com\nusername = your_username\npassword = your_password\n```\n\nThen install:\n\n```bash\npip install mesh-sync-worker-backend-client\n```\n\n## Usage\n\n### Basic Example\n\n```python\nfrom worker_client import WorkerClient\n\n# Initialize client\nclient = WorkerClient(\n base_url='http://localhost:3000',\n api_key='your_api_key', # Optional\n timeout=30 # Optional, default 30s\n)\n\n# Type-safe method call\njob = client.file_download_request({\n 'url': 'https://example.com/file.pdf',\n 'destination': '/downloads/file.pdf'\n})\n\nprint(f'Job created: {job.job_id}')\n\n# Check job status\nstatus = client.get_job_status(job.job_id)\nprint(f'Job state: {status.state}')\n\n# Close the client session\nclient.close()\n```\n\n### Using Context Manager\n\n```python\nfrom worker_client import WorkerClient\n\nwith WorkerClient(base_url='http://localhost:3000') as client:\n job = client.file_download_request({\n 'url': 'https://example.com/file.pdf',\n 'destination': '/downloads/file.pdf'\n })\n print(f'Job ID: {job.job_id}')\n```\n\n### Using Message Type Constants\n\n```python\nfrom worker_client import WorkerClient, MessageTypes\n\nclient = WorkerClient(base_url='http://localhost:3000')\n\n# Dynamic message type\njob = client.send_to_queue(MessageTypes.FILE_DOWNLOAD_REQUEST, {\n 'url': 'https://example.com/file.pdf',\n 'destination': '/downloads/file.pdf'\n})\n```\n\n## Available Message Types\n\n### file-download-request\n\n**Description:** Handles file download requests.\n\n**Method:** `client.file_download_request(data)`\n\n**Payload Type:** `FileDownloadRequestMessage`\n\n**Fields:**\n- `modelId` (string) [\u2713]: The unique identifier for the model to be downloaded.\n- `storageLocation` (object) [\u2713]: The storage location of the model.\n\n### model-discovery-folder-processed-event\n\n**Description:** Handles model discovery folder processed events.\n\n**Method:** `client.model_discovery_folder_processed_event(data)`\n\n**Payload Type:** `ModelDiscoveryFolderProcessedEventMessage`\n\n**Fields:**\n- `connectionId` (string) [\u2713]: The unique identifier for the connection.\n- `folderPath` (string) [\u2713]: The path to the processed folder.\n- `discoveredFiles` (array) [\u2713]: A list of files discovered in the folder.\n- `folderSignature` (object) [\u2717]: A signature representing the state of the folder.\n- `processedAt` (string) [\u2713]: The timestamp when the folder was processed.\n- `statistics` (object) [\u2713]: Statistics about the processed folder.\n\n### model-discovery-scan-found-event\n\n**Description:** Handles model discovery scan found events.\n\n**Method:** `client.model_discovery_scan_found_event(data)`\n\n**Payload Type:** `ModelDiscoveryScanFoundEventMessage`\n\n**Fields:**\n- `modelId` (string) [\u2713]: The unique identifier for the model.\n- `name` (string) [\u2713]: The name of the model.\n- `fileName` (string) [\u2713]: The name of the model file.\n- `description` (string) [\u2713]: A description of the model.\n- `fileTypes` (array) [\u2713]: An array of file types associated with the model.\n- `size` (number) [\u2713]: The size of the model file in bytes.\n- `storageLocation` (object) [\u2713]: The storage location of the model.\n- `providerType` (string) [\u2713]: The type of the storage provider.\n- `metadata` (object) [\u2713]: A flexible object for additional metadata.\n\n### model-discovery-scan-progress-event\n\n**Description:** Handles model discovery scan progress events.\n\n**Method:** `client.model_discovery_scan_progress_event(data)`\n\n**Payload Type:** `ModelDiscoveryScanProgressEventMessage`\n\n**Fields:**\n- `payload` (object) [\u2713]: Contains the discovery scan progress details.\n\n### model-discovery-scan-request\n\n**Description:** Handles model discovery scan requests events.\n\n**Method:** `client.model_discovery_scan_request(data)`\n\n**Payload Type:** `ModelDiscoveryScanRequestMessage`\n\n**Fields:**\n- `libraryId` (string) [\u2713]: The ID of the library to scan.\n\n### model-metadata-generation-completed\n\n**Description:** Handles model metadata generation completed.\n\n**Method:** `client.model_metadata_generation_completed(data)`\n\n**Payload Type:** `ModelMetadataGenerationCompletedMessage`\n\n**Fields:**\n- `modelId` (string) [\u2717]: The unique identifier for the model.\n- `metadata` (object) [\u2713]: The enriched metadata for the model.\n\n### model-metadata-generation-request\n\n**Description:** Handles model metadata generation requests.\n\n**Method:** `client.model_metadata_generation_request(data)`\n\n**Payload Type:** `ModelMetadataGenerationRequestMessage`\n\n**Fields:**\n- `modelId` (string) [\u2713]: The unique identifier for the model.\n- `storageConnectionId` (string) [\u2713]: The ID of the storage connection.\n- `filePath` (string) [\u2713]: The path to the model file.\n- `fileName` (string) [\u2713]: The name of the model file.\n- `fileSize` (number) [\u2713]: The size of the model file in bytes.\n- `fileLastModified` (string) [\u2713]: The last modified date of the model file.\n- `storageProviderType` (string) [\u2713]: The type of the storage provider.\n- `modelThumbnailUrl` (string) [\u2717]: The URL of the model thumbnail.\n- `metamodel` (object) [\u2717]: The metamodel of the model.\n\n### model-metamodel-detection-found\n\n**Description:** Handles model metamodel detection found.\n\n**Method:** `client.model_metamodel_detection_found(data)`\n\n**Payload Type:** `ModelMetamodelDetectionFoundMessage`\n\n**Fields:**\n- `suggestions` (array) [\u2717]: List of metamodel suggestions.\n\n### model-metamodel-detection-request\n\n**Description:** Handles model metamodel detection requests.\n\n**Method:** `client.model_metamodel_detection_request(data)`\n\n**Payload Type:** `ModelMetamodelDetectionRequestMessage`\n\n**Fields:**\n- `connectionId` (string) [\u2717]: The unique identifier for the storage connection.\n- `folderPath` (string) [\u2717]: The path to the folder that was processed.\n- `discoveredFiles` (array) [\u2717]: A list of files discovered in the folder.\n- `folderSignature` (object) [\u2713]: A signature representing the state of the folder.\n- `processedAt` (string) [\u2717]: The timestamp when the folder was processed.\n- `statistics` (object) [\u2713]: Statistics about the processed folder.\n\n### thumbnail-generation-completed\n\n**Description:** Handles thumbnail generation completed.\n\n**Method:** `client.thumbnail_generation_completed(data)`\n\n**Payload Type:** `ThumbnailGenerationCompletedMessage`\n\n**Fields:**\n- `originalJobId` (string) [\u2713]: The ID of the original job that requested the thumbnail generation.\n- `modelId` (string) [\u2713]: The ID of the model that the thumbnail was generated for.\n- `status` (string) [\u2713]: The status of the thumbnail generation.\n- `thumbnailPath` (string) [\u2717]: The path to the generated thumbnail.\n- `errorMessage` (string) [\u2717]: An error message if the thumbnail generation failed.\n- `storageLocation` (object) [\u2713]: The storage location of the model.\n\n### thumbnail-generation-request\n\n**Description:** Handles thumbnail generation requests.\n\n**Method:** `client.thumbnail_generation_request(data)`\n\n**Payload Type:** `ThumbnailGenerationRequestMessage`\n\n**Fields:**\n- `modelId` (string) [\u2713]: The unique identifier for the model requiring a thumbnail.\n- `ownerId` (string) [\u2713]: The identifier of the user who owns the entity.\n- `storageLocation` (object) [\u2713]: The storage location of the model.\n- `previewType` (string) [\u2713]: The type of preview to generate, e.g., 'default', 'static', 'glb'.\n\n## Configuration\n\n### Environment Variables\n\nYou can use environment variables for configuration:\n\n```python\nimport os\nfrom worker_client import WorkerClient\n\nclient = WorkerClient(\n base_url=os.getenv('WORKER_BACKEND_URL', 'http://localhost:3000'),\n api_key=os.getenv('WORKER_BACKEND_API_KEY'),\n timeout=int(os.getenv('WORKER_BACKEND_TIMEOUT', '30'))\n)\n```\n\nSupported environment variables:\n- `WORKER_BACKEND_URL`: Base URL of the worker backend\n- `WORKER_BACKEND_API_KEY`: Optional API key for authentication\n- `WORKER_BACKEND_TIMEOUT`: Request timeout in seconds\n\n### Client Options\n\n```python\nclass WorkerClient:\n def __init__(\n self,\n base_url: str, # Required: Worker backend URL\n api_key: Optional[str] = None, # Optional: API key\n timeout: int = 30 # Optional: Request timeout in seconds\n )\n```\n\n## API Reference\n\n### `WorkerClient`\n\n#### Methods\n\n- `send_to_queue(message_type: str, payload: Dict[str, Any]) -> JobResponse`\n - Send a job to the queue with the specified message type\n \n- `get_job_status(job_id: str) -> JobStatus`\n - Get the current status of a job\n\n- `file_download_request(data: FileDownloadRequestMessage) -> JobResponse`\n - Handles file download requests.\n- `model_discovery_folder_processed_event(data: ModelDiscoveryFolderProcessedEventMessage) -> JobResponse`\n - Handles model discovery folder processed events.\n- `model_discovery_scan_found_event(data: ModelDiscoveryScanFoundEventMessage) -> JobResponse`\n - Handles model discovery scan found events.\n- `model_discovery_scan_progress_event(data: ModelDiscoveryScanProgressEventMessage) -> JobResponse`\n - Handles model discovery scan progress events.\n- `model_discovery_scan_request(data: ModelDiscoveryScanRequestMessage) -> JobResponse`\n - Handles model discovery scan requests events.\n- `model_metadata_generation_completed(data: ModelMetadataGenerationCompletedMessage) -> JobResponse`\n - Handles model metadata generation completed.\n- `model_metadata_generation_request(data: ModelMetadataGenerationRequestMessage) -> JobResponse`\n - Handles model metadata generation requests.\n- `model_metamodel_detection_found(data: ModelMetamodelDetectionFoundMessage) -> JobResponse`\n - Handles model metamodel detection found.\n- `model_metamodel_detection_request(data: ModelMetamodelDetectionRequestMessage) -> JobResponse`\n - Handles model metamodel detection requests.\n- `thumbnail_generation_completed(data: ThumbnailGenerationCompletedMessage) -> JobResponse`\n - Handles thumbnail generation completed.\n- `thumbnail_generation_request(data: ThumbnailGenerationRequestMessage) -> JobResponse`\n - Handles thumbnail generation requests.\n\n- `close() -> None`\n - Close the HTTP session\n\n#### Context Manager Support\n\nThe client supports the context manager protocol for automatic resource cleanup:\n\n```python\nwith WorkerClient(base_url='...') as client:\n # Use client\n pass\n# Session is automatically closed\n```\n\n### Response Types\n\n#### `JobResponse`\n\n```python\nclass JobResponse:\n success: bool\n job_id: str\n message_name: str\n queue: str\n```\n\n#### `JobStatus`\n\n```python\nclass JobStatus:\n job_id: str\n name: str\n queue: str\n state: str # 'waiting' | 'active' | 'completed' | 'failed' | 'delayed'\n data: Any\n returnvalue: Optional[Any]\n progress: Optional[int]\n timestamp: int\n```\n\n## Docker Usage\n\nA Dockerfile is included for containerized usage:\n\n```bash\ncd generated/python\ndocker build -t worker-client-python .\ndocker run -it --rm worker-client-python python\n```\n\n## License\n\nISC\n",
"bugtrack_url": null,
"license": "ISC",
"summary": "Auto-generated Python client for Mesh-Sync worker-backend",
"version": "1.0.0",
"project_urls": {
"Bug Reports": "https://github.com/Mesh-Sync/worker-backend/issues",
"Homepage": "https://github.com/Mesh-Sync/worker-backend",
"Source": "https://github.com/Mesh-Sync/worker-backend"
},
"split_keywords": [
"worker",
" job-queue",
" bullmq",
" client",
" mesh-sync"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5c4cd6297f4ad3e339c34d3a2ffad20e1a172e45d0351b6966e2fa459513721b",
"md5": "5e287c4d69cf6e89ff68e507226eb94a",
"sha256": "813ae0c85c3fa156cde94738eb8ef448c27416c3948be0d4f71b80fafdb59185"
},
"downloads": -1,
"filename": "mesh_sync_worker_backend_client-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5e287c4d69cf6e89ff68e507226eb94a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8212,
"upload_time": "2025-10-17T21:10:09",
"upload_time_iso_8601": "2025-10-17T21:10:09.226875Z",
"url": "https://files.pythonhosted.org/packages/5c/4c/d6297f4ad3e339c34d3a2ffad20e1a172e45d0351b6966e2fa459513721b/mesh_sync_worker_backend_client-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "16a3b7705f25d23021a38569c064f54cbabd2a0c4a2fed71829933171f01005b",
"md5": "f9002b7a8b1960da240b28dfff4cec9c",
"sha256": "c7607c29c7d6d8ea6de062e5ffcec5d7b99fb1ffb398ebde3d7e1ac44c27c71d"
},
"downloads": -1,
"filename": "mesh_sync_worker_backend_client-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "f9002b7a8b1960da240b28dfff4cec9c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7965,
"upload_time": "2025-10-17T21:10:10",
"upload_time_iso_8601": "2025-10-17T21:10:10.741496Z",
"url": "https://files.pythonhosted.org/packages/16/a3/b7705f25d23021a38569c064f54cbabd2a0c4a2fed71829933171f01005b/mesh_sync_worker_backend_client-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-17 21:10:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Mesh-Sync",
"github_project": "worker-backend",
"github_not_found": true,
"lcname": "mesh-sync-worker-backend-client"
}