DaaS-IoT Python SDK – Developer Technical Manual (Linux)
Version: 1.0
Date: October 2025
Author: Sebyone Srl
License:
Project: DaaS-IoT Python SDK (Linux)
—
Table of Contents #
- 1. Introduction
- 2. Architecture
- 3. Directory Structure
- 4. Build & Installation
- 5. Python API
- 6. Usage Example
- 7. CLI Usage
- 8. Contact
—
1. Introduction #
This manual documents the DaaS-IoT Python SDK for Linux, which provides Python bindings for the native libdaas.a library using pybind11.
The SDK exposes the full set of core DaaS APIs through the DaasWrapper class and IDaasApiEvent interface.
The SDK uses CMake FetchContent to automatically download and link the LibDaaS static library during the build process — no headers or libraries are committed to the repository.
2. Architecture #
+---------------------------+
| Python Application |
+---------------------------+
|
v
+---------------------------+
| pydaasiot (pybind11) |
| - DaasWrapper |
| - DDO |
| - IDaasApiEvent |
+---------------------------+
|
v
+---------------------------+
| libdaas.a (C++ core) |
+---------------------------+3. Directory Structure #
daasiot-python/ ├── include/ # LibDaaS and wrapper headers ├── src/ # Pybind11 sources ├── third-parties/ # Dependencies (e.g., nlohmann/json) ├── examples/ # Python usage examples └── CMakeLists.txt # Build configuration
4. Build & Installation #
Prerequisites #
- Python 3.9+
- GCC >= 9
- CMake >= 3.20
- pybind11 (pip install pybind11)
1) Get MD5 checksum #
https://daasiot.com/releases/libdaas/v-0.20.01/linux/gcc/libdaas-0201-linux-gcc.tar.gz.md5
2) Configure with CMake #
cmake -S . -B build -DDAAS_VERSION=0.20.01 -DDAAS_FILETAG=0201 -DDAAS_MD5=<paste_the_md5_here> -DCMAKE_BUILD_TYPE=Release
3) Build #
cmake --build build --config Release
The resulting .so file will be located in the build/ directory.
Note: GitHub Actions will automatically fetch and verify the SDK during CI builds.
4) Upgrading to a new version #
When a new LibDaaS release is available, update only:
- DAAS_VERSION
- DAAS_FILETAG (if changed)
- DAAS_MD5 (copied from the new .md5 file)
No other changes are required.
5. Python API #
DaasWrapper(config: str = None, eventHandler: IDaasApiEvent = None)
Main Methods #
- doInit(sid: int, din: int)
- doPerform(mode: performs_mode_t)
- enableDriver(link: link_t, uri: str)
- map(din: int, link: link_t, uri: str)
- push(din: int, ddo: DDO)
- pull(din: int) -> (daas_error_t, DDO)
- getVersion() -> str
6. Usage Example #
import pydaasiot
class MyHandler(pydaasiot.IDaasApiEvent):
def __init__(self, node):
super().__init__()
self.node = node
def ddoReceivedEvent(self, payload_size, typeset, din):
print(f"DDO received from {din}")
err, ddo = self.node.pull(din)
if err == pydaasiot.daas_error_t.ERROR_NONE:
print(ddo.getPayloadAsBinary())
node = pydaasiot.DaasWrapper("config.json", None)
handler = MyHandler(node)
node.doInit(100, 101)
node.enableDriver(pydaasiot.link_t._LINK_INET4, "127.0.0.1:2222")
node.map(102, pydaasiot.link_t._LINK_INET4, "127.0.0.1:2223")
node.doPerform(pydaasiot.performs_mode_t.PERFORM_CORE_THREAD)7. CLI Usage #
The SDK includes a demo CLI based on Typer.
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
Run the CLI from the build directory:
cd build PYTHONPATH=. python3 ../examples/cli.py --help
8. Contact #
- Sebyone Srl
- Email: info@sebyone.com
- Project: DaaS-IoT Python SDK (Linux)
—
© 2025 Sebyone Srl. All rights reserved.
Last updated: Ottobre 24, 2025 at 1:55 PM