This project is a TEN extension that implements a simple HTTP server, enabling interaction with the running TEN graph from external systems.
- Command Execution: Seamlessly pass any
cmd
to the running TEN graph and receive the results. - Asynchronous Handling: Utilizes
asyncio
andaiohttp
for efficient, non-blocking request processing. - Configurable Server: Easily configure the server's listening address and port through the TEN environment.
Refer to api definition in manifest.json and default values in property.json.
Property | Type | Description |
---|---|---|
listen_addr |
string |
address to listen on |
listen_port |
int32 |
port to listen on |
- Description: Sends a command with the specified name on the TEN graph.
- Request Body: JSON object containing the command properties.
- Response: JSON object with the command execution result.
curl -X POST http://127.0.0.1:8888/cmd/example_cmd_name \
-H "Content-Type: application/json" \
-d '{
"num_property1": 1,
"str_property2": "Hello"
}'
task install
task test