Python Integration

This notebook explores some additional features related to Python integration in RAW.

For ease of demonstration, we will use the Python API directly.

One notable feature is the integration of RAW types with Python types.

For instance, RAW collections automatically become Python collections:

Collections can even be converted onto Numpy arrays, for ease of integration with AI/ML tools:

RAW records automatically become Python dictionaries:

Finally, RAW queries can also call out to Python functions directly.

This allows executing Python code as part of the RAW query.

For this, use the python(<arguments list>) -> $$$ <Python Code $$$ syntax in RQL.

The code in-between $$$ is Python code being executed server-side.

Next: Best Practices