The python SDK template support http and object link client and server, based on the same service.
apigear generate expert --input apis/counter.idl --output sdk --template apigear-io/template-python --features http,olinkOr using a solution document
# demo.solution.yaml
schema: apigear.solution/1.0
layers:
- name: demo
inputs:
- apis/counter.idl
output: sdk
template: appigear-io/template-python
features:
- http
- olinkapigear generate solution demo.solution.yaml- api: creates python interface files
- scaffold: create a full python project
- http: create a http client and http server
- olink: create ObjectLink client and server
Install requirements (pytest, fastapi, websockets, uvicorn)
pip install -r requirements.txtRun the object link server
uvicorn olink_server:appThe implementation is in the module {$module_name}_impl folder. Each file contains one class that implements the service interface. All methods raise a not implemented exception. It is up to you to implement the service according to your needs.