:py:mod:`wfexs_backend.utils.licences`
======================================

.. py:module:: wfexs_backend.utils.licences

.. autodoc2-docstring:: wfexs_backend.utils.licences
   :allowtitles:

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

Classes
~~~~~~~

.. list-table::
   :class: autosummary longtable
   :align: left

   * - :py:obj:`LicenceMatcher <wfexs_backend.utils.licences.LicenceMatcher>`
     - .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcher
          :summary:
   * - :py:obj:`LicenceMatcherSingleton <wfexs_backend.utils.licences.LicenceMatcherSingleton>`
     - .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcherSingleton
          :summary:

Data
~~~~

.. list-table::
   :class: autosummary longtable
   :align: left

   * - :py:obj:`AcceptableLicenceSchemes <wfexs_backend.utils.licences.AcceptableLicenceSchemes>`
     - .. autodoc2-docstring:: wfexs_backend.utils.licences.AcceptableLicenceSchemes
          :summary:
   * - :py:obj:`WorkflowHubShortLicencesList <wfexs_backend.utils.licences.WorkflowHubShortLicencesList>`
     - .. autodoc2-docstring:: wfexs_backend.utils.licences.WorkflowHubShortLicencesList
          :summary:

API
~~~

.. py:data:: AcceptableLicenceSchemes
   :canonical: wfexs_backend.utils.licences.AcceptableLicenceSchemes
   :type: Final[Set[str]]
   :value: None

   .. autodoc2-docstring:: wfexs_backend.utils.licences.AcceptableLicenceSchemes

.. py:data:: WorkflowHubShortLicencesList
   :canonical: wfexs_backend.utils.licences.WorkflowHubShortLicencesList
   :type: Final[Sequence[LicenceDescription]]
   :value: None

   .. autodoc2-docstring:: wfexs_backend.utils.licences.WorkflowHubShortLicencesList

.. py:class:: LicenceMatcher(cacheHandler: wfexs_backend.cache_handler.SchemeHandlerCacheHandler, cacheDir: Optional[pathlib.Path] = None, spdx_version: str = DEFAULT_SPDX_VERSION)
   :canonical: wfexs_backend.utils.licences.LicenceMatcher

   .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcher

   .. rubric:: Initialization

   .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcher.__init__

   .. py:attribute:: DEFAULT_SPDX_VERSION
      :canonical: wfexs_backend.utils.licences.LicenceMatcher.DEFAULT_SPDX_VERSION
      :type: Final[str]
      :value: '3.23'

      .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcher.DEFAULT_SPDX_VERSION

   .. py:attribute:: SPDX_JSON_URL_TEMPLATE
      :canonical: wfexs_backend.utils.licences.LicenceMatcher.SPDX_JSON_URL_TEMPLATE
      :type: Final[str]
      :value: 'https://raw.githubusercontent.com/spdx/license-list-data/v{}/json/licenses.json'

      .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcher.SPDX_JSON_URL_TEMPLATE

   .. py:method:: match_ShortLicence(short_licence: str) -> Optional[LicenceDescription]
      :canonical: wfexs_backend.utils.licences.LicenceMatcher.match_ShortLicence

      .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcher.match_ShortLicence

   .. py:method:: match_LongLicence(long_licence: str) -> Optional[LicenceDescription]
      :canonical: wfexs_backend.utils.licences.LicenceMatcher.match_LongLicence

      .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcher.match_LongLicence

   .. py:method:: matchLicence(licence: str) -> Optional[LicenceDescription]
      :canonical: wfexs_backend.utils.licences.LicenceMatcher.matchLicence

      .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcher.matchLicence

   .. py:method:: describeDocumentedLicences() -> Sequence[LicenceDescription]
      :canonical: wfexs_backend.utils.licences.LicenceMatcher.describeDocumentedLicences

      .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcher.describeDocumentedLicences

.. py:class:: LicenceMatcherSingleton()
   :canonical: wfexs_backend.utils.licences.LicenceMatcherSingleton

   Bases: :py:obj:`wfexs_backend.utils.licences.LicenceMatcher`

   .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcherSingleton

   .. rubric:: Initialization

   .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcherSingleton.__init__

   .. py:attribute:: __instance
      :canonical: wfexs_backend.utils.licences.LicenceMatcherSingleton.__instance
      :type: ClassVar[Optional[LicenceMatcher]]
      :value: None

      .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcherSingleton.__instance

   .. py:method:: __new__() -> wfexs_backend.utils.licences.LicenceMatcher
      :canonical: wfexs_backend.utils.licences.LicenceMatcherSingleton.__new__

      .. autodoc2-docstring:: wfexs_backend.utils.licences.LicenceMatcherSingleton.__new__
