You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

python-api.md 1.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Python API
  2. ## Cutom Node
  3. The custom node API allow you to integrate `dora` into your application. It allows you to retrieve input and send output in any fashion you want.
  4. ### Try it out!
  5. - Install python node API:
  6. ```bash
  7. cd apis/python/node
  8. python3 -m venv .env
  9. source .env/bin/activate
  10. pip install maturin
  11. maturin develop
  12. ```
  13. - Create a python file called `printer.py`:
  14. ```python
  15. {{#include ../../binaries/coordinator/examples/nodes/python/printer.py}}
  16. ```
  17. - Link it in your graph as:
  18. ```yaml
  19. {{#include ../../binaries/coordinator/examples/graphs/python_test.yml:12:17}}
  20. ```
  21. ## Operator
  22. The operator API gives you a framework for operator that is going to be managed by `dora`. This framework enable us to make optimisation and provide advanced features.
  23. ### Try it out!
  24. - Create an operator python file called `op.py`:
  25. ```python
  26. {{#include ../../examples/python-operator/op.py}}
  27. ```
  28. - Link it in your graph as:
  29. ```yaml
  30. {{#include ../../binaries/coordinator/examples/graphs/mini-dataflow.yml:67:73}}
  31. ```

DORA (Dataflow-Oriented Robotic Architecture) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed datafl