.. _quick_start_pyapi:

Running the quickstart via the API
***********************************

Flow360 can be automatically driven via our powerful Python API. All the case setup parameters available in the WebUI are available in the Python API. 

By starting from the same  `evtol_quickstart_grouped.csm <https://simcloud-public-1.s3.amazonaws.com/quickstart/evtol_quickstart_grouped.csm>`_ file as we have downloaded in the above :ref:`geometry upload section <quick_start_geometry>`,
The EVTOL quickstart case shown previously can be easily launched using the following code:

.. literalinclude:: ../../../../Flow360/examples/getting_started/quick_start.py
  :language: PYTHON
  :linenos:

When launching you will see the following output:

.. figure:: Figures/api_output.png
   :width: 100%
   :align: center

   *Output from running the API. Note that the IDs will be different when you run it.*

The script will wait for simulation to complete. After completition, it will plot CL and CD convergence plot:

.. figure:: Figures/cl_cd_convergence.png
   :width: 60%
   :align: center

   *Force coefficient convergence plot.*


.. figure:: Figures/api_cover.jpg
   :width: 0%
