hyrax.verbs.verb_registry
=========================

.. py:module:: hyrax.verbs.verb_registry


Attributes
----------

.. autoapisummary::

   hyrax.verbs.verb_registry.logger
   hyrax.verbs.verb_registry.VERB_REGISTRY


Classes
-------

.. autoapisummary::

   hyrax.verbs.verb_registry.Verb


Functions
---------

.. autoapisummary::

   hyrax.verbs.verb_registry.hyrax_verb
   hyrax.verbs.verb_registry.all_verbs
   hyrax.verbs.verb_registry.all_class_verbs
   hyrax.verbs.verb_registry.is_verb_class
   hyrax.verbs.verb_registry.fetch_verb_class


Module Contents
---------------

.. py:data:: logger

.. py:class:: Verb(config)

   Bases: :py:obj:`abc.ABC`


   Base class for all hyrax verbs

   .. py:method:: __init__

   Overall initialization for all verbs that saves the config


   .. py:attribute:: add_parser_kwargs
      :type:  dict[str, str]


   .. py:attribute:: config


.. py:data:: VERB_REGISTRY
   :type:  dict[str, type[Verb] | None]

.. py:function:: hyrax_verb(cls: type[Verb]) -> type[Verb]

   Decorator to register a hyrax verb


.. py:function:: all_verbs() -> list[str]

   Returns all verbs that are currently registered


.. py:function:: all_class_verbs() -> list[str]

   Returns all verbs that are currently registered with a class-based implementation


.. py:function:: is_verb_class(cli_name: str) -> bool

   Returns true if the verb has a class based implementation

   :param cli_name: The name of the verb on the command line interface
   :type cli_name: str

   :returns: True if the verb has a class-based implementation
   :rtype: bool


.. py:function:: fetch_verb_class(cli_name: str) -> type[Verb] | None

   Gives the class object for the named verb

   :param cli_name: The name of the verb on the command line interface
   :type cli_name: str

   :returns: The verb class or None if no such verb class exists.
   :rtype: Optional[type[Verb]]


