aqt.import_export.importing
===========================

.. py:module:: aqt.import_export.importing


Attributes
----------

.. autoapisummary::

   aqt.import_export.importing.IMPORTERS


Classes
-------

.. autoapisummary::

   aqt.import_export.importing.Importer
   aqt.import_export.importing.ColpkgImporter
   aqt.import_export.importing.ApkgImporter
   aqt.import_export.importing.MnemosyneImporter
   aqt.import_export.importing.CsvImporter
   aqt.import_export.importing.JsonImporter


Functions
---------

.. autoapisummary::

   aqt.import_export.importing.legacy_file_endings
   aqt.import_export.importing.import_file
   aqt.import_export.importing.prompt_for_file_then_import
   aqt.import_export.importing.get_file_path
   aqt.import_export.importing.all_accepted_file_endings
   aqt.import_export.importing.import_collection_package_op
   aqt.import_export.importing.import_progress_update


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

.. py:class:: Importer

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


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: accepted_file_endings
      :type:  list[str]


   .. py:method:: can_import(lowercase_filename: str) -> bool
      :classmethod:



   .. py:method:: do_import(mw: aqt.main.AnkiQt, path: str) -> None
      :classmethod:

      :abstractmethod:



.. py:class:: ColpkgImporter

   Bases: :py:obj:`Importer`


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: accepted_file_endings
      :value: ['.apkg', '.colpkg']



   .. py:method:: can_import(filename: str) -> bool
      :staticmethod:



   .. py:method:: do_import(mw: aqt.main.AnkiQt, path: str) -> None
      :staticmethod:



.. py:class:: ApkgImporter

   Bases: :py:obj:`Importer`


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: accepted_file_endings
      :value: ['.apkg', '.zip']



   .. py:method:: do_import(mw: aqt.main.AnkiQt, path: str) -> None
      :staticmethod:



.. py:class:: MnemosyneImporter

   Bases: :py:obj:`Importer`


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: accepted_file_endings
      :value: ['.db']



   .. py:method:: do_import(mw: aqt.main.AnkiQt, path: str) -> None
      :staticmethod:



.. py:class:: CsvImporter

   Bases: :py:obj:`Importer`


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: accepted_file_endings
      :value: ['.csv', '.tsv', '.txt']



   .. py:method:: do_import(mw: aqt.main.AnkiQt, path: str) -> None
      :staticmethod:



.. py:class:: JsonImporter

   Bases: :py:obj:`Importer`


   Helper class that provides a standard way to create an ABC using
   inheritance.


   .. py:attribute:: accepted_file_endings
      :value: ['.anki-json']



   .. py:method:: do_import(mw: aqt.main.AnkiQt, path: str) -> None
      :staticmethod:



.. py:data:: IMPORTERS
   :type:  list[type[Importer]]

.. py:function:: legacy_file_endings(col: anki.collection.Collection) -> list[str]

.. py:function:: import_file(mw: aqt.main.AnkiQt, path: str) -> None

.. py:function:: prompt_for_file_then_import(mw: aqt.main.AnkiQt) -> None

.. py:function:: get_file_path(mw: aqt.main.AnkiQt) -> str | None

.. py:function:: all_accepted_file_endings(mw: aqt.main.AnkiQt) -> set[str]

.. py:function:: import_collection_package_op(mw: aqt.main.AnkiQt, path: str, success: aqt.qt.Callable[[], None]) -> aqt.operations.QueryOp[None]

.. py:function:: import_progress_update(progress: anki.collection.Progress, update: aqt.progress.ProgressUpdate) -> None

