get_statsΒΆ

.. py:function:: get_stats(context: ~typing.Any) -> ~behave_retry.stats.RetryStats | None :module: behave_retry

Get the retry statistics collected during the run.

Use this for programmatic access to retry data (e.g. JSON reports via stats.to_dict()) instead of reading the private context._behave_retry_stats attribute.

:param context: Behave context object.

:returns: The RetryStats instance, or None if setup_retry was not called.