Metadata-Version: 2.4
Name: indro
Version: 1.0.2
Summary: Production-ready SDK for the Indro AI Ecosystem
Home-page: https://abhinav337463-indro-edge-api.hf.space
Author: Indro Studio
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Provides-Extra: ws
Requires-Dist: websockets>=12.0; extra == "ws"
Provides-Extra: keyring
Requires-Dist: keyring>=24.0.0; extra == "keyring"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

Indro SDK

Production-ready Python SDK for the Indro Edge API.

The Indro SDK provides a secure, high-performance, enterprise-grade client for interacting with the Indro Edge inference platform.

Base API Endpoint:

https://abhinav337463-indro-edge-api.hf.space

---

Features

Core Features

- Fully typed API
- Automatic request serialization
- Automatic response parsing
- GET, POST, PUT, PATCH, DELETE support
- JSON requests
- Form data requests
- Multipart file uploads
- Streaming response support
- Connection pooling
- Keep-alive support
- Batch request support
- Request cancellation
- Request deduplication
- Offline request queue
- Middleware system
- Interceptor system
- Plugin system
- Event hooks
- Fluent API design

---

Security Features

- API Key Authentication
- Bearer Token Authentication
- Custom Header Authentication
- Secure HTTPS enforcement
- SSL validation
- Request signing
- HMAC support
- Header sanitization
- Input sanitization
- Output sanitization
- Secret masking in logs
- Anti-injection protections
- Secure error handling
- Environment variable support

---

Performance Features

- In-memory cache
- Persistent cache
- Smart cache invalidation
- Compression support
- Lazy loading
- Request prioritization
- Concurrent request management
- Queue management
- Optimized memory usage

---

Monitoring Features

- Request metrics
- Performance metrics
- Latency tracking
- Correlation IDs
- Request tracing
- Error tracking
- Health checks
- Telemetry hooks

---

Installation

Install directly:

pip install indro

Development installation:

pip install indro[dev]

WebSocket support:

pip install indro[ws]

Secure token storage support:

pip install indro[keyring]

---

Quick Start

from main import IndroClient

client = IndroClient()

result = client.predict(
    model_name="house-price-model",
    features=[
        1200,
        3,
        2,
        5
    ]
)

print(result.prediction)

---

Initialization

Basic:

from main import IndroClient

client = IndroClient()

Custom endpoint:

client = IndroClient(
    base_url="https://abhinav337463-indro-edge-api.hf.space"
)

Debug mode:

client = IndroClient(
    debug=True
)

Verbose logging:

client = IndroClient(
    verbose=True
)

---

Authentication

API Key

client = IndroClient(
    api_key="YOUR_API_KEY"
)

---

Bearer Token

client = IndroClient(
    bearer_token="YOUR_TOKEN"
)

---

Custom Headers

client = IndroClient(
    headers={
        "X-Custom": "value"
    }
)

---

Available API Methods

List Models

Maps to:

GET /api/models

Example:

models = client.models()

print(models.models)

---

Predict

Maps to:

POST /api/predict

Example:

response = client.predict(
    model_name="house-price-model",
    features=[
        1200,
        3,
        2,
        5
    ]
)

print(response.prediction)

---

Async Predict

response = await client.predict_async(
    model_name="house-price-model",
    features=[1,2,3,4]
)

---

Batch Requests

responses = client.batch_predict([
    {
        "model_name": "model-a",
        "features": [1,2,3]
    },
    {
        "model_name": "model-b",
        "features": [4,5,6]
    }
])

---

Health Checks

The SDK includes helpers for operational endpoints.

Health

health = client.health()

Endpoint:

GET /health

---

Readiness

ready = client.ready()

Endpoint:

GET /ready

---

Metrics

metrics = client.metrics()

Endpoint:

GET /metrics

---

SLO Dashboard

slo = client.slo()

Endpoint:

GET /slo

---

Caching

Enable memory cache:

client = IndroClient(
    cache_enabled=True
)

Custom TTL:

client = IndroClient(
    cache_ttl=300
)

Clear cache:

client.cache.clear()

---

Retry System

Automatic retry support:

client = IndroClient(
    retries=5
)

Exponential backoff:

client = IndroClient(
    retry_backoff_factor=2
)

---

Timeout Management

client = IndroClient(
    timeout=60
)

Per request:

client.predict(
    model_name="my-model",
    features=[1,2,3],
    timeout=120
)

---

Middleware

def middleware(request):
    print(request.url)
    return request

client.add_middleware(middleware)

---

Interceptors

Request interceptor:

client.interceptors.request.use(
    lambda req: req
)

Response interceptor:

client.interceptors.response.use(
    lambda res: res
)

---

Event Hooks

@client.on("request")
def on_request(event):
    print(event)

@client.on("response")
def on_response(event):
    print(event)

@client.on("error")
def on_error(event):
    print(event)

---

Error Handling

Base error:

from main import IndroSDKError

Authentication:

from main import AuthenticationError

Validation:

from main import ValidationError

Timeout:

from main import TimeoutError

Network:

from main import NetworkError

Server:

from main import ServerError

Retry exhaustion:

from main import RetryExhaustedError

Example:

try:
    client.predict(
        model_name="demo",
        features=[1,2,3]
    )
except ValidationError:
    pass
except NetworkError:
    pass

---

Environment Variables

INDRO_BASE_URL=https://abhinav337463-indro-edge-api.hf.space

INDRO_API_KEY=your_api_key

INDRO_BEARER_TOKEN=your_token

INDRO_TIMEOUT=60

INDRO_DEBUG=false

---

Production Recommendations

For production deployments:

client = IndroClient(
    timeout=60,
    retries=5,
    cache_enabled=True,
    verify_ssl=True,
    keep_alive=True,
    compression=True
)

---

API Compatibility

Compatible with:

- Indro Edge API v3.x
- Future v3 minor releases
- Backward compatibility layer included

---

Thread Safety

The SDK is designed to be thread-safe and suitable for:

- Web servers
- FastAPI
- Django
- Flask
- Background workers
- Microservices
- Enterprise applications

---

License

MIT License

Copyright (c) 2026

Abhinav Anand

---

Example

from main import IndroClient

client = IndroClient(
    debug=True,
    cache_enabled=True
)

models = client.models()

print(models.models)

prediction = client.predict(
    model_name=models.models[0],
    features=[1.0, 2.0, 3.0, 4.0]
)

print(prediction)

Built for the Indro Edge ecosystem.
