Scadable Edge SDK — write device logic in Python, compile to native
Project description
Scadable SDK
Write industrial device logic in Python. Compile to artifacts your gateway runs. Version it like code.
Scadable SDK is the authoring tool for the Scadable platform. You declare which registers to read from your Modbus PLC, what controllers should run on incoming data, and what to publish back to the cloud — all in plain Python. The compiler turns your project into deployable artifacts (YAML driver configs + manifest + bundle) that the gateway-linux runtime reads on boot.
pip install scadable-sdk
30-second hello world
scadable init linux boiler-room
cd boiler-room
scadable add device modbus-tcp inlet-temp
scadable verify
scadable compile
ls build/ # → manifest.json, drivers/inlet-temp.yaml, bundle.tar.gz
The compile output goes straight onto a gateway:
scp build/drivers/inlet-temp.yaml \
pi@gateway.local:/etc/scadable/devices/inlet-temp/config.yaml
ssh pi@gateway.local sudo systemctl restart scadable-gateway
The gateway picks it up, spawns the Modbus driver subprocess, and starts publishing telemetry to your project.
What you can write
# devices/inlet_temp.py
from scadable import Device, Register, modbus_tcp, every, SECONDS
class InletTemp(Device):
id = "inlet-temp"
connection = modbus_tcp(host="${PLC_HOST}", port=502, slave=1)
poll = every(5, SECONDS)
registers = [
Register(40001, "temperature",
dtype="float32", unit="°C", scale=0.1,
on_error="last_known"),
Register(40003, "flow",
dtype="uint32", unit="L/min", endianness="little"),
]
# controllers/safety.py
from scadable import Controller, Topics, on, SECONDS
from devices.inlet_temp import InletTemp
class Topics(Topics):
OVERHEAT_ALERT = "alerts/inlet-overheat"
class SafetyMonitor(Controller):
@on.interval(2, SECONDS)
def check(self):
t = InletTemp.temperature
self.publish("inlet-data", {"temperature": t},
quality="good" if t < 200 else "stale")
if t > 95:
self.alert("critical", f"Inlet temp {t}°C — shutting down")
InletTemp.flow = 0 # writes back to register
That's it. The DSL is declarative, target-agnostic, and reads like English — your controls engineers can review it without learning Python idioms.
Why this exists
Industrial IoT projects today either:
- Hand-write driver code per device, in a per-vendor SDK that doesn't port between deployments, or
- Build flow-chart configurators in proprietary tools that lock you to one vendor and don't version-control cleanly.
Scadable's bet: device logic deserves the same treatment as application code — written in a real language, reviewed in pull requests, tested in CI, deployed via the same release pipeline as the rest of your software. The SDK is the authoring half of that bet; the gateway is the runtime half.
Status
v0.2.0 — current release.
| Target | Status | Protocols |
|---|---|---|
| linux | production | modbus_tcp, modbus_rtu, ble, gpio, serial, i2c, rtsp |
| esp32 | preview | DSL accepted; emitter ships in v0.3 |
| rtos | preview | DSL accepted; emitter ships in v0.4 |
Modbus (TCP + RTU) is the production protocol surface in v0.2.0; other protocols compile but their gateway-side drivers are not yet ready for production fleets.
Documentation
- Getting started — full walkthrough
- DSL reference — every public symbol
- Targets — capability matrix per platform
- Migrating from v0.1 — TOML→YAML, dtype, on_error
- Error catalog — every compile error explained
- Architecture — for contributors
Contributing
See CONTRIBUTING.md. Quick path:
git clone https://github.com/scadable/scadable-sdk
cd scadable-sdk
python -m venv .venv && source .venv/bin/activate
pip install -e ".[test]"
pytest -q # 172 tests, < 1 second
ruff check .
mypy --strict scadable
License
Apache-2.0. See LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scadable_sdk-0.2.2.tar.gz.
File metadata
- Download URL: scadable_sdk-0.2.2.tar.gz
- Upload date:
- Size: 55.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
970bca298dab8ac580774d6cc57cc6bca5e9c968d37516c08cff675669253a33
|
|
| MD5 |
a466216d97061828098e9cac13dbb26a
|
|
| BLAKE2b-256 |
e580e36e586254873e1cd1ee0e8cb537256dcff709e1dbd7b274a62eac923343
|
Provenance
The following attestation bundles were made for scadable_sdk-0.2.2.tar.gz:
Publisher:
release.yml on scadable/scadable-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scadable_sdk-0.2.2.tar.gz -
Subject digest:
970bca298dab8ac580774d6cc57cc6bca5e9c968d37516c08cff675669253a33 - Sigstore transparency entry: 1364375768
- Sigstore integration time:
-
Permalink:
scadable/scadable-sdk@e2a92d0c69cb77f9a72faf03b07f2c746b4f6665 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/scadable
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e2a92d0c69cb77f9a72faf03b07f2c746b4f6665 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scadable_sdk-0.2.2-py3-none-any.whl.
File metadata
- Download URL: scadable_sdk-0.2.2-py3-none-any.whl
- Upload date:
- Size: 65.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
702cb64f937edbe72b80b3a29ebec6d96d47f6fdd1482519b74d88bad118440b
|
|
| MD5 |
a349f442104f7ea6bc70c2041712e69f
|
|
| BLAKE2b-256 |
2938da069632523796128f3d13634bc29974bf248742f87517955c6ee4f2aeec
|
Provenance
The following attestation bundles were made for scadable_sdk-0.2.2-py3-none-any.whl:
Publisher:
release.yml on scadable/scadable-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scadable_sdk-0.2.2-py3-none-any.whl -
Subject digest:
702cb64f937edbe72b80b3a29ebec6d96d47f6fdd1482519b74d88bad118440b - Sigstore transparency entry: 1364375898
- Sigstore integration time:
-
Permalink:
scadable/scadable-sdk@e2a92d0c69cb77f9a72faf03b07f2c746b4f6665 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/scadable
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e2a92d0c69cb77f9a72faf03b07f2c746b4f6665 -
Trigger Event:
push
-
Statement type: