:py:mod:`wfexs_backend.pushers.zenodo_export`
=============================================

.. py:module:: wfexs_backend.pushers.zenodo_export

.. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export
   :allowtitles:

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

Classes
~~~~~~~

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

   * - :py:obj:`ZenodoExportPlugin <wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin>`
     - .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin
          :summary:

API
~~~

.. py:class:: ZenodoExportPlugin(refdir: pathlib.Path, setup_block: Optional[SecurityContextConfig] = None, default_licences: Sequence[LicenceDescription] = [], default_orcids: Sequence[ResolvedORCID] = [], default_preferred_id: Optional[str] = None)
   :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin

   Bases: :py:obj:`wfexs_backend.pushers.abstract_token_sandboxed_export.AbstractTokenSandboxedExportPlugin`

   .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin

   .. rubric:: Initialization

   .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.__init__

   .. py:attribute:: PLUGIN_NAME
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.PLUGIN_NAME
      :type: ClassVar[SymbolicName]
      :value: 'cast(...)'

      .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.PLUGIN_NAME

   .. py:attribute:: ENABLED
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.ENABLED
      :type: ClassVar[bool]
      :value: True

      .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.ENABLED

   .. py:attribute:: ZENODO_PREFIX
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.ZENODO_PREFIX
      :type: Final[str]
      :value: 'https://zenodo.org'

      .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.ZENODO_PREFIX

   .. py:attribute:: SANDBOX_ZENODO_PREFIX
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.SANDBOX_ZENODO_PREFIX
      :type: Final[str]
      :value: 'https://sandbox.zenodo.org'

      .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.SANDBOX_ZENODO_PREFIX

   .. py:attribute:: DEFAULT_REMOTE_PATH_SEPARATOR
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.DEFAULT_REMOTE_PATH_SEPARATOR
      :type: Final[str]
      :value: '__'

      .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.DEFAULT_REMOTE_PATH_SEPARATOR

   .. py:method:: get_api_prefix() -> str
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.get_api_prefix

   .. py:method:: _gen_headers() -> MutableMapping[str, str]
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin._gen_headers

      .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin._gen_headers

   .. py:method:: book_pid(preferred_id: Optional[str] = None, initially_required_metadata: Optional[Mapping[str, Any]] = None, initially_required_community_specific_metadata: Optional[Mapping[str, Any]] = None, title: Optional[str] = None, description: Optional[str] = None, licences: Sequence[LicenceDescription] = [], resolved_orcids: Sequence[ResolvedORCID] = []) -> Optional[DraftEntry]
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.book_pid

   .. py:method:: _book_pid_internal(preferred_id: Optional[str] = None, initially_required_metadata: Optional[Mapping[str, Any]] = None, title: Optional[str] = None, description: Optional[str] = None, licences: Sequence[LicenceDescription] = [], resolved_orcids: Sequence[ResolvedORCID] = []) -> Tuple[Optional[str], Optional[str], Optional[Mapping[str, Any]]]
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin._book_pid_internal

      .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin._book_pid_internal

   .. py:property:: _customized_book_pid_error_string
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin._customized_book_pid_error_string
      :type: str

      .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin._customized_book_pid_error_string

   .. py:method:: discard_booked_pid(pid_or_draft: Union[str, DraftEntry]) -> bool
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.discard_booked_pid

   .. py:method:: get_pid_metadata(pid: str) -> Optional[Mapping[str, Any]]
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.get_pid_metadata

   .. py:method:: get_file_bucket_prefix(draft_entry: wfexs_backend.pushers.DraftEntry) -> str
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.get_file_bucket_prefix

      .. autodoc2-docstring:: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.get_file_bucket_prefix

   .. py:method:: upload_file_to_draft(draft_entry: wfexs_backend.pushers.DraftEntry, filename: Union[str, IO[bytes]], remote_filename: Optional[str], content_size: Optional[int] = None) -> Mapping[str, Any]
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.upload_file_to_draft

   .. py:method:: update_record_metadata(draft_entry: wfexs_backend.pushers.DraftEntry, metadata: Optional[Mapping[str, Any]] = None, community_specific_metadata: Optional[Mapping[str, Any]] = None, title: Optional[str] = None, description: Optional[str] = None, licences: Sequence[LicenceDescription] = [], resolved_orcids: Sequence[ResolvedORCID] = []) -> Mapping[str, Any]
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.update_record_metadata

   .. py:method:: publish_draft_record(draft_entry: wfexs_backend.pushers.DraftEntry) -> Mapping[str, Any]
      :canonical: wfexs_backend.pushers.zenodo_export.ZenodoExportPlugin.publish_draft_record
