Metadata-Version: 2.1
Name: tawnyapi
Version: 0.2.4
Summary: 
Author: TAWNY GmbH
Author-email: support@tawny.ai
Requires-Python: >=3.8,<3.12
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: aiofiles (>=0.7.0,<0.8.0)
Requires-Dist: aiohttp (>=3.7.4,<4.0.0)
Requires-Dist: imutils (>=0.5.4,<0.6.0)
Requires-Dist: numpy (>=1.23.3,<2.0.0)
Requires-Dist: opencv-python (==4.9.0.80)
Requires-Dist: tensorflow (==2.13.0) ; platform_machine == "x86_64"
Requires-Dist: tensorflow-macos (==2.13.0) ; platform_machine == "arm64"
Requires-Dist: toml (>=0.10.2,<0.11.0)
Requires-Dist: typer (>=0.3.2,<0.4.0)
Description-Content-Type: text/markdown

# Python-TAWNYAPI

## Documentation

- Find documentation under [docs.tawny.ai](https://docs.tawny.ai/api/pythonsdk.html#installation)
- More information about tawny.ai under [info@tawny.ai](mailto:info@tawny.ai)


#### Simple Example with OpenCV

```python
import cv2
from tawnyapi.vision.client import TawnyVisionApiClient
 
VIDEO_PATH = "<PATH TO YOUR VIDEO FILE>"
API_KEY = "<YOUR TAWNY API KEY>"
 
client = TawnyVisionApiClient(api_key=API_KEY)
cap = cv2.VideoCapture(VIDEO_PATH)
 
while True:
 
    ret, frame = cap.read()
    if not ret:
        break
 
    # Analyzing images already in memory:
    result = client.analyze_images(
        images=[frame],
        max_results=1,
        resize=None,
        features=[
            apitypes.ImageAnnotationFeatures.FACE_DETECTION,
            apitypes.ImageAnnotationFeatures.FACE_EMOTION,
            apitypes.ImageAnnotationFeatures.FACE_DESCRIPTOR,
            apitypes.ImageAnnotationFeatures.HEAD_POSE,
            apitypes.ImageAnnotationFeatures.FACE_LANDMARKS,
            apitypes.ImageAnnotationFeatures.ATTENTION,
            apitypes.ImageAnnotationFeatures.POSE
        ])
 
    print(result)
```
