==================== Orchestration Python ==================== Workflows are written in Artificial's Orchestration Python (OP), a strict subset of the Python programming language. ✅ Orchestration Python supports the following: * Most :doc:`built-in functions ` * :external+python:mod:`math` * :external+python:mod:`enum`: :external+python:class:`~enum.Enum` * :external+python:mod:`typing`: :external+python:class:`~typing.List`, :external+python:class:`~typing.Dict`, :external+python:class:`~typing.Set` * :pypi:`dataclasses-json` and :external+python:mod:`json`: these are imported, but :command:`wfgen` will not try to load or introspect these. * :external+python:mod:`dataclasses`: :external+python:deco:`~dataclasses.dataclass` and :external+python:func:`~dataclasses.field` (including the ``default_factory`` parameter) * Any module that is parseable by :command:`wfgen` * Unpacking return values - e.g. ``foo, bar = baz()`` ❌ Orchestration Python does not support the following: * ``del`` * ``async for`` and ``async with`` * ``raise`` * ``assert`` * ``global`` * ``nonlocal`` * ``lambda`` * set literals * list, dict, and set comprehensions and generator expressions * ``yield`` and ``yield from`` * tuples (except unpacking return values as noted above) * the ``*`` and ``**`` splat operators * the ``@`` operator * ``range`` * instantiating plain Python classes (:external+python:mod:`dataclasses`: are supported) Finally, most of the Python object model is unsupported. You can access fields of dataclasses and elements of lists, but you cannot call methods on objects. .. toctree:: :maxdepth: 1 :hidden: Built-In Functions