Metadata-Version: 2.4
Name: oaas-sdk2-py
Version: 0.1.9
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Requires-Dist: asyncio>=3.4.3
Requires-Dist: uvloop>=0.21.0; sys_platform != "win32"
Requires-Dist: betterproto[compiler]==2.0.0b7
Requires-Dist: eclipse-zenoh>=1.3.2
Requires-Dist: grpcio-tools>=1.71.0
Requires-Dist: grpcio>=1.71.0
Requires-Dist: pydantic>=2.10.6
Requires-Dist: pydantic-settings>=2.8.1
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: tsidpy>=1.1.5

# OaaS-SDK2

Python Lib for OaaS-IoT

## Prerequisites
- cargo (install via [rust](https://rustup.rs/))
- oprc-cli `cargo install --git https://github.com/pawissanutt/oaas-rs.git oprc-cli`
- [uv](https://github.com/astral-sh/uv) (python package manager)
- docker or podman

## Setup

```bash
uv sync
./.venv/Scripts/activate
# or
source ./.venv/bin/activate # for Mac or Linux 
```

## Run Example with Docker Compose

```bash
docker compose up -d --build
# invoke new function of 'example.hello' class
echo "{}" | oprc-cli i -g http://localhost:10002 example.hello 0 new -p -
```

## TODOs



### Features

- [x] read data  
- [x] Write data  
- [x] Serve gRPC for invocation  
- [x] Create an object reference 
- [x] Call gRPC to invoke a foreign function 
- [x] Implement thread Pool  
- [x] Connect to Zenoh  
- [ ] Device Agent:  
    - [x] Invoke a remote function on the referenced object  
    - [x] Invoke a local function on the referenced object
        - [ ] Need testings!  
    - [x] Invoke a local function on device agent from the anywhere else  
        - [ ] Need testings!
    - [x] Access data from the referenced object  
        - [ ] Need testings!
- [ ] create interface of referenced object 
- [ ] declare deployment configuration in code

### QoL Features
- [x] Improve data encode/decode
- [ ] Development CLI
    - [ ] generate project
    - [ ] setup development environment (e.g., generate docker compose for ODGM)
    - [ ] generate YAML class definition from class in Python 
    - [ ] build project
    - [ ] deploy class/object


## NOTE

- grpcio vs grpclib

    https://github.com/llucax/python-grpc-benchmark

- There is an error on `oneof`. We need to remove data validation function on `ValData` class after the code generation.
