The ``session.py`` module
=========================
.. py:module:: ansys.dpf.core.session
Summary
-------
.. py:currentmodule:: session
.. tab-set::
.. tab-item:: Classes
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~ansys.dpf.core.session.EventHandlerBase`
- Abstract base class for handling server events related to workflows.
* - :py:obj:`~ansys.dpf.core.session.EventHandler`
- Handle events for a server session, including operator tracking and workflow progress updates.
* - :py:obj:`~ansys.dpf.core.session.GrpcEventHandler`
- Handle events for a server session using gRPC.
* - :py:obj:`~ansys.dpf.core.session.Session`
- Create a class to manage server sessions and handle events like progress and logging.
.. tab-item:: Functions
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~progress_call_back`
- Tracking callback function for the progress of operators in a workflow.
.. tab-item:: Constants
.. list-table::
:header-rows: 0
:widths: auto
* - :py:obj:`~LOG`
-
.. toctree::
:titlesonly:
:maxdepth: 1
:hidden:
EventHandlerBase
EventHandler
GrpcEventHandler
Session
Description
-----------
Session.
Module detail
-------------
.. py:function:: progress_call_back(obj, nature, arg)
Tracking callback function for the progress of operators in a workflow.
This function updates a progress bar based on the operator's status.
:rtype: None
.. rubric:: Notes
If `nature` is 0, the number of started operators is incremented.
If `nature` is 1, the number of finished operators is incremented and the progress bar is updated.
If `nature` is 9, the counters for started and finished operators are reset.
If the progress bar exists, its progress is updated accordingly.
.. py:data:: LOG