Metadata-Version: 2.4
Name: n10w02
Version: 0.0.7
Summary: cannon n10w02 camera
Author-email: Kengo NAKADA <kengo.nakada@email.com>
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: xlogger-py
Requires-Dist: ese774-frame
Requires-Dist: setuptools
Requires-Dist: python-dotenv
Requires-Dist: fastapi
Requires-Dist: fastapi-utils
Requires-Dist: uvicorn
Requires-Dist: pydantic
Requires-Dist: starlette
Requires-Dist: requests
Requires-Dist: aiohttp
Requires-Dist: httpx
Requires-Dist: pywin32; sys_platform == "win32"
Requires-Dist: coloredlogs
Requires-Dist: colorlog
Requires-Dist: pytest
Requires-Dist: pytest-asyncio
Requires-Dist: pyyaml
Requires-Dist: toml
Requires-Dist: tomli; python_version < "3.11"
Requires-Dist: importlib-metadata>=4.0; python_version < "3.8"
Requires-Dist: nest_asyncio
Requires-Dist: sphinx
Requires-Dist: myst-parser
Requires-Dist: sphinx-autobuild
Requires-Dist: sphinx-rtd-theme
Requires-Dist: sphinxcontrib-napoleon
Requires-Dist: linkify-it-py
Requires-Dist: grpcio
Requires-Dist: grpcio-tools
Requires-Dist: google
Requires-Dist: pygame
Dynamic: license-file

# N10-W02 gRPC

[![en](https://img.shields.io/badge/lang-en-red.svg)](https://github.com/ohara-lab-su/n10w02/blob/main/README.md)
[![ja](https://img.shields.io/badge/lang-ja-yellow.svg)](https://github.com/ohara-lab-su/n10w02/blob/main/README.ja.md)


This is a minimal setup that exposes `N10W02Ctrl` directly through `grpc_frame`.

## Changes

BMP images are approximately 8 MB, exceeding the default 4 MB receive-message limit in gRPC Python.  
Support for passing `grpc_options` has been added to `grpc_frame`, and the N10-W02 server and client are configured with a 64 MB limit.

## Image Capture

```python
client = N10W02GrpcClient(
    server_ip="127.0.0.1",
    grpc_port=50051,
    max_message_mb=64,
)

image = client.capture_bmp_bytes(focus=False)

with open("capture.bmp", "wb") as f:
    f.write(image)
```

## Server

```bash
python n10w02_grpc_server.py
```

`N10W02Ctrl` is passed directly to `create_com_grpc_server()`.  
EventBus, streaming, and image wrappers are not used.
