Python SDK
Python gRPC client with API shape consistent with the C API.
Installation
pip install grpcio protobuf
Quickstart
from tijet_grpc import TinCore
with TinCore() as client:
client.connect()
client.set_parameter("PRINT_SPEED_TIMER", "100")
speed = client.get_parameter("PRINT_SPEED_TIMER")
print(f"PRINT_SPEED_TIMER = {speed}")
checksum = client.set_print_data(b"\x1B\x40", index=0)
print(f"SHA-256: {checksum}")
Exception Hierarchy
$$TiJetError (base, code attribute)
├── InvalidArgumentError (code = -1)
├── NotConnectedError (code = -2)
├── TimeoutError (code = -3)
├── ServerError (code = -5)
└── InternalError (code = -6)$$
Note: For the complete Python API reference including event/log subscription and type aliases, see the Chinese documentation.