zia-sdk-python


Namezia-sdk-python JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://neurolabs.com
SummaryPython SDK for Neurolabs ZIA platform
upload_time2025-08-11 22:54:03
maintainerNone
docs_urlNone
authorNeurolabs
requires_python<4.0,>=3.10
licenseMIT
keywords ai computer-vision image-recognition neurolabs zia
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Zia Image Recognition SDK

A simple, ergonomic Python SDK for the Zia Image Recognition API.

For more detailed information about the project architecture and design decisions, see [BUILD_SUMMARY.md](BUILD_SUMMARY.md).

## Features

- **Ergonomics first** - Single-line calls for common tasks
- **Type safety** - Rich typings with IDE autocompletion
- **Zero config by default** - Sensible defaults with environment variable support
- **Predictable errors** - Typed exceptions with actionable messages
- **Async/await support** - Modern Python async patterns
- **Image Recognition** - Create tasks, upload images, and retrieve results
- **Catalog Management** - Create, update, and retrieve catalog items
- **Raw JSON Access** - Flexible data access for custom processing

## Installation

### Using Poetry (Recommended for Development)

[Poetry](https://python-poetry.org/) is a modern dependency management tool for Python.

```bash
# Install Poetry (if not already installed)
curl -sSL https://install.python-poetry.org | python3 -

# Clone and install the SDK
git clone https://github.com/neurolabs/zia-sdk-python.git
cd zia-sdk-python

# Install with all dependencies (including DataFrame utilities)
poetry install --with dev

# Or install specific extras
poetry install --extras "dataframe"  # For pandas support
poetry install --extras "databricks" # For Databricks support (includes pandas and pyspark)
poetry install --extras "all"        # For all optional dependencies

# Activate the virtual environment
poetry shell
```

### Using pip (Production)

```bash
# Basic installation (no DataFrame support)
pip install zia-sdk-python

# With pandas support
pip install zia-sdk-python[dataframe]


# With Databricks support (includes pandas and pyspark)
pip install zia-sdk-python[databricks]

# With all optional dependencies
pip install zia-sdk-python[all]

# Or install from GitHub
pip install git+https://github.com/neurolabs/zia-sdk-python.git
```

### Manual Installation

```bash
# Clone the repository
git clone https://github.com/neurolabs/zia-sdk-python.git
cd zia-sdk-python

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt
pip install -e .
```

For detailed installation instructions, see [INSTALLATION.md](INSTALLATION.md).

## Quick Start

### Configuration

The SDK supports multiple ways to configure your API key:

#### 1. Environment Variables (Recommended)

```bash
export NEUROLABS_API_KEY="your-api-key-here"
```

#### 2. .env File

```bash
# Copy the example file
cp env.example .env

# Edit .env with your API key
NEUROLABS_API_KEY=your-api-key-here
```

#### 3. Command Line Arguments

```python
client = Zia(api_key="your-api-key-here")
```

### Async Usage (Recommended)

```python
import asyncio
from zia import Zia, NLCatalogItemCreate

async def main():
    # Initialize client (uses NEUROLABS_API_KEY env var)
    async with Zia() as client:
        # Health check
        is_healthy = await client.health_check()
        print(f"API Health: {is_healthy}")
        
        # List catalog items
        items = await client.catalog.list_items(limit=10)
        print(f"Found {len(items)} catalog items")
        
        # Create a catalog item
        new_item = NLCatalogItemCreate(
            name="My Product",
            brand="My Brand",
            barcode="1234567890123"
        )
        
        # Add thumbnail binary data if available
        # with open("thumbnail.jpg", "rb") as f:
        #     new_item.thumbnail = f.read()
        
        created_item = await client.catalog.create_item(new_item)
        print(f"Created: {created_item.name}")

if __name__ == "__main__":
    asyncio.run(main())
```

### Sync Usage (Simple Operations)

```python
from zia import Zia

# Initialize client
client = Zia()

# Health check
is_healthy = client.health_check_sync()
print(f"API Health: {is_healthy}")

# List catalog items
items = client.list_items_sync(limit=10)
print(f"Found {len(items)} catalog items")

# List tasks
tasks = client.list_tasks_sync(limit=5)
print(f"Found {len(tasks)} tasks")
```

## Configuration

The SDK supports multiple configuration sources with the following precedence:

1. **Explicit parameters** - Passed to `Zia()` constructor
2. **Environment variables** - Set in your environment
3. **Config file** - Future feature

### Environment Variables

```bash
export NEUROLABS_API_KEY="your-api-key"
export NEUROLABS_BASE_URL="https://api.neurolabs.ai/v2"  # Optional
export NEUROLABS_TIMEOUT="30.0"  # Optional
export NEUROLABS_MAX_RETRIES="3"  # Optional
```

### Explicit Configuration

```python
client = Zia(
    api_key="your-api-key",
    base_url="https://api.neurolabs.ai/v2",
    timeout=30.0,
    max_retries=3
)
```

## API Reference

### Client

The main `Zia` client provides access to all API functionality:

```python
client = Zia()

# Catalog operations
await client.catalog.list_items()
await client.catalog.create_item(item)
await client.catalog.get_item(uuid)

# Image recognition operations
await client.task_management.list_tasks()
await client.task_management.create_task(task)
await client.image_recognition.upload_images(task_uuid, image_paths)
```

### Catalog Operations

#### List Items

```python
items = await client.catalog.list_items(
    name="product name",  # Optional filter
    limit=50,            # Max 100
    offset=0             # Pagination
)
```

#### Create Item

```python
from zia import NLCatalogItemCreate

item = NLCatalogItemCreate(
    name="Product Name",
    brand="Brand Name",
    barcode="1234567890123",
    height=0.1,  # meters
    width=0.05,  # meters
    depth=0.02   # meters
)

# Add thumbnail binary data if available
# with open("thumbnail.jpg", "rb") as f:
#     item.thumbnail = f.read()

created_item = await client.catalog.create_item(item)
```

#### Upload Reference Images

```python
image_paths = [Path("image1.jpg"), Path("image2.jpg")]
updated_item = await client.catalog.upload_reference_images(
    item_uuid="item-uuid",
    image_paths=image_paths
)
```

### Image Recognition Operations

#### Create Task

```python
from zia import NLIRTaskCreate

task = NLIRTaskCreate(
    name="My Recognition Task",
    catalog_items=["item-uuid-1", "item-uuid-2"],
    compute_realogram=True,
    compute_shares=True
)

created_task = await client.task_management.create_task(task)
```

#### Upload Images

```python
# Upload local images
image_paths = [Path("image1.jpg"), Path("image2.jpg")]
result_uuids = await client.image_recognition.upload_images(
    task_uuid="task-uuid",
    image_paths=image_paths
)

# Upload image URLs
image_urls = [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
]
result_uuids = await client.image_recognition.upload_image_urls(
    task_uuid="task-uuid",
    image_urls=image_urls
)
```

#### Get Results

```python
# Get all results for a task
results = await client.results_management.get_task_results(
    task_uuid="task-uuid",
    limit=50,
    offset=0
)

# Get specific result
result = await client.results_management.get_result(
    task_uuid="task-uuid",
    result_uuid="result-uuid"
)
```

### Raw JSON Access

For flexible data processing, you can access raw JSON responses:

```python
# Get raw JSON without parsing
raw_result = await client.result_management.get_result_raw(
    task_uuid="task-uuid",
    result_uuid="result-uuid"
)

# Access data directly
print(f"Status: {raw_result['status']}")
print(f"Duration: {raw_result.get('duration')}")

# Flexible data processing
if 'coco' in raw_result and raw_result['coco']:
    annotations = raw_result['coco'].get('annotations', [])
    for annotation in annotations:
        score = annotation.get('neurolabs', {}).get('score', 0)
        if score > 0.9:
            print(f"High confidence: {score}")
```

### IRResults DataFrame Conversion

#### Spark Integration

```python
from zia.utils import to_spark_dataframe
from pyspark.sql import SparkSession

# Create Spark session
spark = SparkSession.builder.appName("ZiaAnalysis").getOrCreate()

# Convert to Spark DataFrame
spark_df = to_spark_dataframe(results, spark)
spark_df.show()

# Write to Delta table
spark_df.write.format("delta").mode("overwrite").saveAsTable("catalog.schema.table")

# Import the utilities

from dataframe import (
    ir_results_to_dataframe,
    ir_results_to_summary_dataframe,
    analyze_results_dataframe,
    filter_high_confidence_detections,
    get_product_summary,
)

# Get results

results = await client.results_management.get_all_task_results(task_uuid)

# Convert to detailed DataFrame (one row per detection)

df_detailed = ir_results_to_dataframe(results)
print(f"Found {len(df_detailed)} detections")

# Convert to summary DataFrame (one row per result)

df_summary = ir_results_to_summary_dataframe(results)
print(f"Processed {len(df_summary)} images")

# Analyze the data

analysis = analyze_results_dataframe(df_detailed)
print(f"Average detection score: {analysis['score_stats']['mean']:.3f}")
print(f"High confidence detections: {analysis['score_distribution']['high_confidence']}")

# Filter high confidence detections

high_conf_df = filter_high_confidence_detections(df_detailed, threshold=0.9)
print(f"High confidence detections: {len(high_conf_df)}")

# Get product summary

product_summary = get_product_summary(df_detailed)
print(f"Unique products: {len(product_summary)}")

```

The detailed DataFrame includes all detection information with proper category-annotation matching. See `utils/README.md` for complete documentation.

## Error Handling

The SDK provides typed exceptions for different error scenarios:

```python
from zia import (
    NeurolabsError,
    NeurolabsAuthError,
    NeurolabsRateLimitError,
    NeurolabsValidationError
)

try:
    await client.catalog.create_item(item)
except NeurolabsAuthError as e:
    print(f"Authentication failed: {e}")
except NeurolabsRateLimitError as e:
    print(f"Rate limited. Retry after: {e.retry_after} seconds")
except NeurolabsValidationError as e:
    print(f"Validation error: {e}")
except NeurolabsError as e:
    print(f"Unexpected error: {e}")
```

## Models

The SDK uses Pydantic models for type safety and validation:

### CatalogItem

```python
from zia import NLCatalogItem

item = NLCatalogItem(
    uuid="item-uuid",
    status="ONBOARDED",
    thumbnail_url="https://...",
    name="Product Name",
    brand="Brand Name",
    created_at=datetime.now(),
    updated_at=datetime.now()
)
```

### IRTask

```python
from zia import NLIRTask

task = NLIRTask(
    uuid="task-uuid",
    name="Task Name",
    created_at=datetime.now(),
    updated_at=datetime.now(),
    compute_realogram=False,
    compute_shares=False
)
```

### IRResult

```python
from zia import NLIRResult

result = NLIRResult(
    uuid="result-uuid",
    task_uuid="task-uuid",
    image_url="https://...",
    status="PROCESSED",
    failure_reason="",
    created_at=datetime.now(),
    updated_at=datetime.now(),
    confidence_score=0.95
)
```

## Development

### Setup

```bash
git clone <repository>
cd zia-sdk-python
poetry install
```

### Testing

```bash
# Run all tests 
# NOTE: Integration tests create actual items, tasks, image processing in the backend, based on your API KEY 
poetry run pytest

# Run with coverage
poetry run pytest --cov=zia --cov-report=html

# Run specific test file
poetry run pytest zia/tests/test_client.py -v
```

### Code Formatting

```bash
# Format code
poetry run black .
poetry run isort .

# Check formatting
poetry run black --check .
poetry run isort --check-only .
```

### Type Checking

```bash
poetry run mypy zia/
```

### Linting

```bash
poetry run ruff check .
```

## CLI Interface

The SDK includes a command-line interface:

```bash
# Health check
zia health

# List items
zia items 10

# List tasks
zia tasks 5
```

## License

This project is licensed under the MIT License.

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests
5. Submit a pull request

            

Raw data

            {
    "_id": null,
    "home_page": "https://neurolabs.com",
    "name": "zia-sdk-python",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "ai, computer-vision, image-recognition, neurolabs, zia",
    "author": "Neurolabs",
    "author_email": "support@neurolabs.com",
    "download_url": "https://files.pythonhosted.org/packages/a8/77/ccc691616dbe635dcdc5766d370f8fb4940402d09b0affec40847e124ca5/zia_sdk_python-0.0.6.tar.gz",
    "platform": null,
    "description": "# Zia Image Recognition SDK\n\nA simple, ergonomic Python SDK for the Zia Image Recognition API.\n\nFor more detailed information about the project architecture and design decisions, see [BUILD_SUMMARY.md](BUILD_SUMMARY.md).\n\n## Features\n\n- **Ergonomics first** - Single-line calls for common tasks\n- **Type safety** - Rich typings with IDE autocompletion\n- **Zero config by default** - Sensible defaults with environment variable support\n- **Predictable errors** - Typed exceptions with actionable messages\n- **Async/await support** - Modern Python async patterns\n- **Image Recognition** - Create tasks, upload images, and retrieve results\n- **Catalog Management** - Create, update, and retrieve catalog items\n- **Raw JSON Access** - Flexible data access for custom processing\n\n## Installation\n\n### Using Poetry (Recommended for Development)\n\n[Poetry](https://python-poetry.org/) is a modern dependency management tool for Python.\n\n```bash\n# Install Poetry (if not already installed)\ncurl -sSL https://install.python-poetry.org | python3 -\n\n# Clone and install the SDK\ngit clone https://github.com/neurolabs/zia-sdk-python.git\ncd zia-sdk-python\n\n# Install with all dependencies (including DataFrame utilities)\npoetry install --with dev\n\n# Or install specific extras\npoetry install --extras \"dataframe\"  # For pandas support\npoetry install --extras \"databricks\" # For Databricks support (includes pandas and pyspark)\npoetry install --extras \"all\"        # For all optional dependencies\n\n# Activate the virtual environment\npoetry shell\n```\n\n### Using pip (Production)\n\n```bash\n# Basic installation (no DataFrame support)\npip install zia-sdk-python\n\n# With pandas support\npip install zia-sdk-python[dataframe]\n\n\n# With Databricks support (includes pandas and pyspark)\npip install zia-sdk-python[databricks]\n\n# With all optional dependencies\npip install zia-sdk-python[all]\n\n# Or install from GitHub\npip install git+https://github.com/neurolabs/zia-sdk-python.git\n```\n\n### Manual Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/neurolabs/zia-sdk-python.git\ncd zia-sdk-python\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\npip install -e .\n```\n\nFor detailed installation instructions, see [INSTALLATION.md](INSTALLATION.md).\n\n## Quick Start\n\n### Configuration\n\nThe SDK supports multiple ways to configure your API key:\n\n#### 1. Environment Variables (Recommended)\n\n```bash\nexport NEUROLABS_API_KEY=\"your-api-key-here\"\n```\n\n#### 2. .env File\n\n```bash\n# Copy the example file\ncp env.example .env\n\n# Edit .env with your API key\nNEUROLABS_API_KEY=your-api-key-here\n```\n\n#### 3. Command Line Arguments\n\n```python\nclient = Zia(api_key=\"your-api-key-here\")\n```\n\n### Async Usage (Recommended)\n\n```python\nimport asyncio\nfrom zia import Zia, NLCatalogItemCreate\n\nasync def main():\n    # Initialize client (uses NEUROLABS_API_KEY env var)\n    async with Zia() as client:\n        # Health check\n        is_healthy = await client.health_check()\n        print(f\"API Health: {is_healthy}\")\n        \n        # List catalog items\n        items = await client.catalog.list_items(limit=10)\n        print(f\"Found {len(items)} catalog items\")\n        \n        # Create a catalog item\n        new_item = NLCatalogItemCreate(\n            name=\"My Product\",\n            brand=\"My Brand\",\n            barcode=\"1234567890123\"\n        )\n        \n        # Add thumbnail binary data if available\n        # with open(\"thumbnail.jpg\", \"rb\") as f:\n        #     new_item.thumbnail = f.read()\n        \n        created_item = await client.catalog.create_item(new_item)\n        print(f\"Created: {created_item.name}\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### Sync Usage (Simple Operations)\n\n```python\nfrom zia import Zia\n\n# Initialize client\nclient = Zia()\n\n# Health check\nis_healthy = client.health_check_sync()\nprint(f\"API Health: {is_healthy}\")\n\n# List catalog items\nitems = client.list_items_sync(limit=10)\nprint(f\"Found {len(items)} catalog items\")\n\n# List tasks\ntasks = client.list_tasks_sync(limit=5)\nprint(f\"Found {len(tasks)} tasks\")\n```\n\n## Configuration\n\nThe SDK supports multiple configuration sources with the following precedence:\n\n1. **Explicit parameters** - Passed to `Zia()` constructor\n2. **Environment variables** - Set in your environment\n3. **Config file** - Future feature\n\n### Environment Variables\n\n```bash\nexport NEUROLABS_API_KEY=\"your-api-key\"\nexport NEUROLABS_BASE_URL=\"https://api.neurolabs.ai/v2\"  # Optional\nexport NEUROLABS_TIMEOUT=\"30.0\"  # Optional\nexport NEUROLABS_MAX_RETRIES=\"3\"  # Optional\n```\n\n### Explicit Configuration\n\n```python\nclient = Zia(\n    api_key=\"your-api-key\",\n    base_url=\"https://api.neurolabs.ai/v2\",\n    timeout=30.0,\n    max_retries=3\n)\n```\n\n## API Reference\n\n### Client\n\nThe main `Zia` client provides access to all API functionality:\n\n```python\nclient = Zia()\n\n# Catalog operations\nawait client.catalog.list_items()\nawait client.catalog.create_item(item)\nawait client.catalog.get_item(uuid)\n\n# Image recognition operations\nawait client.task_management.list_tasks()\nawait client.task_management.create_task(task)\nawait client.image_recognition.upload_images(task_uuid, image_paths)\n```\n\n### Catalog Operations\n\n#### List Items\n\n```python\nitems = await client.catalog.list_items(\n    name=\"product name\",  # Optional filter\n    limit=50,            # Max 100\n    offset=0             # Pagination\n)\n```\n\n#### Create Item\n\n```python\nfrom zia import NLCatalogItemCreate\n\nitem = NLCatalogItemCreate(\n    name=\"Product Name\",\n    brand=\"Brand Name\",\n    barcode=\"1234567890123\",\n    height=0.1,  # meters\n    width=0.05,  # meters\n    depth=0.02   # meters\n)\n\n# Add thumbnail binary data if available\n# with open(\"thumbnail.jpg\", \"rb\") as f:\n#     item.thumbnail = f.read()\n\ncreated_item = await client.catalog.create_item(item)\n```\n\n#### Upload Reference Images\n\n```python\nimage_paths = [Path(\"image1.jpg\"), Path(\"image2.jpg\")]\nupdated_item = await client.catalog.upload_reference_images(\n    item_uuid=\"item-uuid\",\n    image_paths=image_paths\n)\n```\n\n### Image Recognition Operations\n\n#### Create Task\n\n```python\nfrom zia import NLIRTaskCreate\n\ntask = NLIRTaskCreate(\n    name=\"My Recognition Task\",\n    catalog_items=[\"item-uuid-1\", \"item-uuid-2\"],\n    compute_realogram=True,\n    compute_shares=True\n)\n\ncreated_task = await client.task_management.create_task(task)\n```\n\n#### Upload Images\n\n```python\n# Upload local images\nimage_paths = [Path(\"image1.jpg\"), Path(\"image2.jpg\")]\nresult_uuids = await client.image_recognition.upload_images(\n    task_uuid=\"task-uuid\",\n    image_paths=image_paths\n)\n\n# Upload image URLs\nimage_urls = [\n    \"https://example.com/image1.jpg\",\n    \"https://example.com/image2.jpg\"\n]\nresult_uuids = await client.image_recognition.upload_image_urls(\n    task_uuid=\"task-uuid\",\n    image_urls=image_urls\n)\n```\n\n#### Get Results\n\n```python\n# Get all results for a task\nresults = await client.results_management.get_task_results(\n    task_uuid=\"task-uuid\",\n    limit=50,\n    offset=0\n)\n\n# Get specific result\nresult = await client.results_management.get_result(\n    task_uuid=\"task-uuid\",\n    result_uuid=\"result-uuid\"\n)\n```\n\n### Raw JSON Access\n\nFor flexible data processing, you can access raw JSON responses:\n\n```python\n# Get raw JSON without parsing\nraw_result = await client.result_management.get_result_raw(\n    task_uuid=\"task-uuid\",\n    result_uuid=\"result-uuid\"\n)\n\n# Access data directly\nprint(f\"Status: {raw_result['status']}\")\nprint(f\"Duration: {raw_result.get('duration')}\")\n\n# Flexible data processing\nif 'coco' in raw_result and raw_result['coco']:\n    annotations = raw_result['coco'].get('annotations', [])\n    for annotation in annotations:\n        score = annotation.get('neurolabs', {}).get('score', 0)\n        if score > 0.9:\n            print(f\"High confidence: {score}\")\n```\n\n### IRResults DataFrame Conversion\n\n#### Spark Integration\n\n```python\nfrom zia.utils import to_spark_dataframe\nfrom pyspark.sql import SparkSession\n\n# Create Spark session\nspark = SparkSession.builder.appName(\"ZiaAnalysis\").getOrCreate()\n\n# Convert to Spark DataFrame\nspark_df = to_spark_dataframe(results, spark)\nspark_df.show()\n\n# Write to Delta table\nspark_df.write.format(\"delta\").mode(\"overwrite\").saveAsTable(\"catalog.schema.table\")\n\n# Import the utilities\n\nfrom dataframe import (\n    ir_results_to_dataframe,\n    ir_results_to_summary_dataframe,\n    analyze_results_dataframe,\n    filter_high_confidence_detections,\n    get_product_summary,\n)\n\n# Get results\n\nresults = await client.results_management.get_all_task_results(task_uuid)\n\n# Convert to detailed DataFrame (one row per detection)\n\ndf_detailed = ir_results_to_dataframe(results)\nprint(f\"Found {len(df_detailed)} detections\")\n\n# Convert to summary DataFrame (one row per result)\n\ndf_summary = ir_results_to_summary_dataframe(results)\nprint(f\"Processed {len(df_summary)} images\")\n\n# Analyze the data\n\nanalysis = analyze_results_dataframe(df_detailed)\nprint(f\"Average detection score: {analysis['score_stats']['mean']:.3f}\")\nprint(f\"High confidence detections: {analysis['score_distribution']['high_confidence']}\")\n\n# Filter high confidence detections\n\nhigh_conf_df = filter_high_confidence_detections(df_detailed, threshold=0.9)\nprint(f\"High confidence detections: {len(high_conf_df)}\")\n\n# Get product summary\n\nproduct_summary = get_product_summary(df_detailed)\nprint(f\"Unique products: {len(product_summary)}\")\n\n```\n\nThe detailed DataFrame includes all detection information with proper category-annotation matching. See `utils/README.md` for complete documentation.\n\n## Error Handling\n\nThe SDK provides typed exceptions for different error scenarios:\n\n```python\nfrom zia import (\n    NeurolabsError,\n    NeurolabsAuthError,\n    NeurolabsRateLimitError,\n    NeurolabsValidationError\n)\n\ntry:\n    await client.catalog.create_item(item)\nexcept NeurolabsAuthError as e:\n    print(f\"Authentication failed: {e}\")\nexcept NeurolabsRateLimitError as e:\n    print(f\"Rate limited. Retry after: {e.retry_after} seconds\")\nexcept NeurolabsValidationError as e:\n    print(f\"Validation error: {e}\")\nexcept NeurolabsError as e:\n    print(f\"Unexpected error: {e}\")\n```\n\n## Models\n\nThe SDK uses Pydantic models for type safety and validation:\n\n### CatalogItem\n\n```python\nfrom zia import NLCatalogItem\n\nitem = NLCatalogItem(\n    uuid=\"item-uuid\",\n    status=\"ONBOARDED\",\n    thumbnail_url=\"https://...\",\n    name=\"Product Name\",\n    brand=\"Brand Name\",\n    created_at=datetime.now(),\n    updated_at=datetime.now()\n)\n```\n\n### IRTask\n\n```python\nfrom zia import NLIRTask\n\ntask = NLIRTask(\n    uuid=\"task-uuid\",\n    name=\"Task Name\",\n    created_at=datetime.now(),\n    updated_at=datetime.now(),\n    compute_realogram=False,\n    compute_shares=False\n)\n```\n\n### IRResult\n\n```python\nfrom zia import NLIRResult\n\nresult = NLIRResult(\n    uuid=\"result-uuid\",\n    task_uuid=\"task-uuid\",\n    image_url=\"https://...\",\n    status=\"PROCESSED\",\n    failure_reason=\"\",\n    created_at=datetime.now(),\n    updated_at=datetime.now(),\n    confidence_score=0.95\n)\n```\n\n## Development\n\n### Setup\n\n```bash\ngit clone <repository>\ncd zia-sdk-python\npoetry install\n```\n\n### Testing\n\n```bash\n# Run all tests \n# NOTE: Integration tests create actual items, tasks, image processing in the backend, based on your API KEY \npoetry run pytest\n\n# Run with coverage\npoetry run pytest --cov=zia --cov-report=html\n\n# Run specific test file\npoetry run pytest zia/tests/test_client.py -v\n```\n\n### Code Formatting\n\n```bash\n# Format code\npoetry run black .\npoetry run isort .\n\n# Check formatting\npoetry run black --check .\npoetry run isort --check-only .\n```\n\n### Type Checking\n\n```bash\npoetry run mypy zia/\n```\n\n### Linting\n\n```bash\npoetry run ruff check .\n```\n\n## CLI Interface\n\nThe SDK includes a command-line interface:\n\n```bash\n# Health check\nzia health\n\n# List items\nzia items 10\n\n# List tasks\nzia tasks 5\n```\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests\n5. Submit a pull request\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python SDK for Neurolabs ZIA platform",
    "version": "0.0.6",
    "project_urls": {
        "Homepage": "https://neurolabs.com",
        "Repository": "https://github.com/neurolabs/zia-sdk-python"
    },
    "split_keywords": [
        "ai",
        " computer-vision",
        " image-recognition",
        " neurolabs",
        " zia"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3570e5de95cd82397538e9d158f7b549bb8908c254ba21eed866772178062592",
                "md5": "faa55c8e334297e7b3b0b802a0d91159",
                "sha256": "6566264caa2c38fa2e776ec32a24cc94b07f15db7aef2333d88b161c2de300c6"
            },
            "downloads": -1,
            "filename": "zia_sdk_python-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "faa55c8e334297e7b3b0b802a0d91159",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 39512,
            "upload_time": "2025-08-11T22:54:02",
            "upload_time_iso_8601": "2025-08-11T22:54:02.301981Z",
            "url": "https://files.pythonhosted.org/packages/35/70/e5de95cd82397538e9d158f7b549bb8908c254ba21eed866772178062592/zia_sdk_python-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a877ccc691616dbe635dcdc5766d370f8fb4940402d09b0affec40847e124ca5",
                "md5": "41be3e6d2b927d8da8a86ec75407548b",
                "sha256": "9f5065b0bcd54044782c35d0ddce51484f865674dbb1b4f48e3b367308369ff4"
            },
            "downloads": -1,
            "filename": "zia_sdk_python-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "41be3e6d2b927d8da8a86ec75407548b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 33701,
            "upload_time": "2025-08-11T22:54:03",
            "upload_time_iso_8601": "2025-08-11T22:54:03.586395Z",
            "url": "https://files.pythonhosted.org/packages/a8/77/ccc691616dbe635dcdc5766d370f8fb4940402d09b0affec40847e124ca5/zia_sdk_python-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-11 22:54:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neurolabs",
    "github_project": "zia-sdk-python",
    "github_not_found": true,
    "lcname": "zia-sdk-python"
}
        
Elapsed time: 2.11576s