Metadata-Version: 2.4
Name: tectravision-sdk
Version: 0.1.0
Summary: Tectra SDK — sign, watermark, and verify images/videos locally with the Tectra platform
Author-email: NextAI Technologies <hello@tectra.vision>
License: Proprietary
Project-URL: Homepage, https://tectra.vision
Project-URL: Documentation, https://tectra.vision/docs/sdk
Project-URL: Repository, https://github.com/nextai-tech/tectravision-sdk
Keywords: content-authenticity,watermark,provenance,blockchain,digital-signature
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Multimedia :: Graphics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.26.0
Requires-Dist: pynacl>=1.5.0
Requires-Dist: cryptography>=42.0.0
Requires-Dist: invisible-watermark>=0.2.0
Requires-Dist: imagehash>=4.3.1
Requires-Dist: Pillow>=10.2.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: opencv-python-headless>=4.9.0
Requires-Dist: watchdog>=4.0.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"

# Tectra SDK

Sign, watermark, and verify images/videos locally with the Tectra platform.

## Installation

```bash
pip install tectravision-sdk
# or from source:
pip install -e ./sdk
```

## Quick Start

```python
from tectravision_sdk import TectraClient

client = TectraClient(
    api_key="iai_...",
    signing_key_id="your-signing-key-uuid",
    api_url="https://tectra.vision",
    fernet_key="your-fernet-key",  # or set TECTRA_FERNET_KEY env var
)

# Sign an image (locally — only metadata sent to backend)
result = client.sign("photo.jpg")
print(f"Signed! Record: {result['record_id']}")
print(f"Watermarked file: {result['output_path']}")

# Sign a video (frame-by-frame watermarking)
result = client.sign_video("footage.mp4", keyframe_fps=1)

# Verify any image/video
result = client.verify("suspect.jpg")
print(f"Authentic: {result['authentic']}")
print(f"Origin: {result.get('origin')}")

# Watch a directory and auto-sign new files
def on_signed(path, result):
    print(f"Auto-signed {path}: {result['record_id']}")

client.watch("/camera/output/", callback=on_signed)
```

## How It Works

1. Your signing key's encrypted private key is fetched once from the backend
2. Decrypted locally using the Fernet key (never sent back)
3. Images are watermarked and signed entirely on your machine
4. Only hashes + metadata are POSTed to the backend for registration + blockchain anchoring
5. Your actual image/video bytes never leave your infrastructure
