Metadata-Version: 2.4
Name: scadora
Version: 0.1.0
Summary: Client for the Scadora SCADA REST API: read and write tags, query history and alarms
Author: Scadora
License-Expression: MIT
Project-URL: Homepage, https://scadora.app
Project-URL: Documentation, https://scadora.app/docs/rest-api/
Project-URL: Issues, https://github.com/AnatoliiRavkov/scadora-releases/issues
Keywords: scada,hmi,industrial,automation,plc,opc,modbus,historian
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Manufacturing
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# scadora

Python client for the [Scadora](https://scadora.app) SCADA REST API: read and write tags, query history and alarms. Standard library only, Python 3.8+.

```
pip install scadora
```

```python
from scadora import Scadora

scada = Scadora("https://scada-server:5101", token="sct_...", verify="scadora-server.cer")

print(scada.read("Tank1.Level"))                 # current value
print(scada.read_many(["Tank1.Level", "Pump1.Run"]))
for tag in scada.tags("Tank*"):                  # values with quality and time
    print(tag.name, tag.value, tag.unit, tag.good)

scada.write("Tank1.Setpoint", 42.5)              # needs the Operate permission

for s in scada.history("Tank1.Level", hours=24, max_points=500):
    print(s.time, s.value)

print(scada.alarms())
scada.acknowledge(["Tank1_High"])
```

**Token.** An administrator issues API tokens in the Scadora editor: *Project → Users and roles → select a user → API tokens…*. A token has the permissions of its user, every write goes to the audit log, and a revoked token stops working at once.

**Certificate.** The server uses its own TLS certificate. Download it from `https://<server>:5101/scadora-server.cer` and pass the path as `verify`. If you connect by an address that is not in the certificate, add `check_hostname=False`. `verify=False` turns the check off — for test benches only.

API reference: `https://<server>:5101/api/v1/docs` on your server and [scadora.app/docs/rest-api](https://scadora.app/docs/rest-api/).
