aqt.profiles
============

.. py:module:: aqt.profiles


Attributes
----------

.. autoapisummary::

   aqt.profiles.metaConf
   aqt.profiles.profileConf


Classes
-------

.. autoapisummary::

   aqt.profiles.VideoDriver
   aqt.profiles.LoadMetaResult
   aqt.profiles.ProfileManager


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

.. py:class:: VideoDriver(*args, **kwds)

   Bases: :py:obj:`enum.Enum`


   Create a collection of name/value pairs.

   Example enumeration:

   >>> class Color(Enum):
   ...     RED = 1
   ...     BLUE = 2
   ...     GREEN = 3

   Access them by:

   - attribute access:

     >>> Color.RED
     <Color.RED: 1>

   - value lookup:

     >>> Color(1)
     <Color.RED: 1>

   - name lookup:

     >>> Color['RED']
     <Color.RED: 1>

   Enumerations can be iterated over, and know how many members they have:

   >>> len(Color)
   3

   >>> list(Color)
   [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

   Methods can be added to enumerations, and members can have their own
   attributes -- see the documentation for details.


   .. py:attribute:: OpenGL
      :value: 'auto'



   .. py:attribute:: ANGLE
      :value: 'angle'



   .. py:attribute:: Software
      :value: 'software'



   .. py:attribute:: Metal
      :value: 'metal'



   .. py:attribute:: Vulkan
      :value: 'vulkan'



   .. py:attribute:: Direct3D
      :value: 'd3d11'



   .. py:method:: default_for_platform() -> VideoDriver
      :staticmethod:



   .. py:method:: constrained_to_platform() -> VideoDriver


   .. py:method:: next() -> VideoDriver


   .. py:method:: all_for_platform() -> list[VideoDriver]
      :staticmethod:



.. py:data:: metaConf

.. py:data:: profileConf
   :type:  dict[str, Any]

.. py:class:: LoadMetaResult

   .. py:attribute:: firstTime
      :type:  bool


   .. py:attribute:: loadError
      :type:  bool


.. py:class:: ProfileManager(base: pathlib.Path)

   .. py:attribute:: default_answer_keys


   .. py:attribute:: last_run_version
      :type:  int
      :value: 0



   .. py:attribute:: session
      :type:  dict[str, Any]


   .. py:attribute:: name
      :type:  str | None
      :value: None



   .. py:attribute:: db
      :type:  anki.db.DB | None
      :value: None



   .. py:attribute:: profile
      :type:  dict | None
      :value: None



   .. py:attribute:: invalid_profile_provided_on_commandline
      :value: False



   .. py:attribute:: base
      :value: ''



   .. py:method:: setupMeta() -> LoadMetaResult


   .. py:method:: openProfile(profile: str) -> None


   .. py:method:: profiles() -> list[str]


   .. py:method:: load(name: str) -> bool


   .. py:method:: save() -> None


   .. py:method:: create(name: str) -> None


   .. py:method:: remove(name: str) -> None


   .. py:method:: trashCollection() -> None


   .. py:method:: rename(name: str) -> None


   .. py:method:: profileFolder(create: bool = True) -> str


   .. py:method:: addonFolder() -> str


   .. py:method:: backupFolder() -> str


   .. py:method:: collectionPath() -> str


   .. py:method:: addon_logs() -> str


   .. py:method:: downgrade(profiles: list[str]) -> list[str]

      Downgrade all profiles. Return a list of profiles that couldn't be opened.



   .. py:method:: get_created_base_folder(path_override: str | None) -> pathlib.Path
      :staticmethod:


      Create the base folder and return it, using provided path or default.



   .. py:method:: setDefaultLang(idx: int) -> None


   .. py:method:: setLang(code: str) -> None


   .. py:method:: video_driver() -> VideoDriver


   .. py:method:: set_video_driver(driver: VideoDriver) -> None


   .. py:method:: set_next_video_driver() -> None


   .. py:method:: uiScale() -> float


   .. py:method:: setUiScale(scale: float) -> None


   .. py:method:: reduce_motion() -> bool


   .. py:method:: set_reduce_motion(on: bool) -> None


   .. py:method:: minimalist_mode() -> bool


   .. py:method:: set_minimalist_mode(on: bool) -> None


   .. py:method:: spacebar_rates_card() -> bool


   .. py:method:: set_spacebar_rates_card(on: bool) -> None


   .. py:method:: get_answer_key(ease: int) -> str | None


   .. py:method:: set_answer_key(ease: int, key: str)


   .. py:method:: hide_top_bar() -> bool


   .. py:method:: set_hide_top_bar(on: bool) -> None


   .. py:method:: top_bar_hide_mode() -> aqt.toolbar.HideMode


   .. py:method:: set_top_bar_hide_mode(mode: aqt.toolbar.HideMode) -> None


   .. py:method:: hide_bottom_bar() -> bool


   .. py:method:: set_hide_bottom_bar(on: bool) -> None


   .. py:method:: bottom_bar_hide_mode() -> aqt.toolbar.HideMode


   .. py:method:: set_bottom_bar_hide_mode(mode: aqt.toolbar.HideMode) -> None


   .. py:method:: last_addon_update_check() -> int


   .. py:method:: set_last_addon_update_check(secs: int) -> None


   .. py:method:: check_for_addon_updates() -> bool


   .. py:method:: set_check_for_addon_updates(on: bool) -> None


   .. py:method:: night_mode() -> bool


   .. py:method:: theme() -> aqt.theme.Theme


   .. py:method:: set_theme(theme: aqt.theme.Theme) -> None


   .. py:method:: set_widget_style(style: aqt.theme.WidgetStyle) -> None


   .. py:method:: get_widget_style() -> aqt.theme.WidgetStyle


   .. py:method:: browser_layout() -> aqt.browser.layout.BrowserLayout


   .. py:method:: set_browser_layout(layout: aqt.browser.layout.BrowserLayout) -> None


   .. py:method:: editor_key(mode: aqt.editor.EditorMode) -> str


   .. py:method:: tags_collapsed(mode: aqt.editor.EditorMode) -> bool


   .. py:method:: set_tags_collapsed(mode: aqt.editor.EditorMode, collapsed: bool) -> None


   .. py:method:: legacy_import_export() -> bool

      Always returns False so users with this option enabled are not stuck on the legacy importer after the UI option is removed.



   .. py:method:: set_legacy_import_export(enabled: bool) -> None


   .. py:method:: last_loaded_profile_name() -> str | None


   .. py:method:: set_last_loaded_profile_name(name: str) -> None


   .. py:method:: set_sync_key(val: str | None) -> None


   .. py:method:: set_sync_username(val: str | None) -> None


   .. py:method:: set_host_number(val: int | None) -> None


   .. py:method:: check_for_updates() -> bool


   .. py:method:: set_update_check(on: bool) -> None


   .. py:method:: media_syncing_enabled() -> bool


   .. py:method:: auto_syncing_enabled() -> bool

      True if syncing on startup/shutdown enabled.



   .. py:method:: sync_auth() -> anki.sync.SyncAuth | None


   .. py:method:: clear_sync_auth() -> None


   .. py:method:: sync_endpoint() -> str | None


   .. py:method:: set_current_sync_url(url: str | None) -> None


   .. py:method:: middle_click_paste_enabled() -> bool


   .. py:method:: set_middle_click_paste_enabled(val: bool) -> None


   .. py:method:: custom_sync_url() -> str | None

      A custom server provided by the user.



   .. py:method:: set_custom_sync_url(url: str | None) -> None


   .. py:method:: periodic_sync_media_minutes() -> int


   .. py:method:: set_periodic_sync_media_minutes(val: int) -> None


   .. py:method:: show_browser_table_tooltips() -> bool


   .. py:method:: set_show_browser_table_tooltips(val: bool) -> None


   .. py:method:: set_network_timeout(timeout_secs: int) -> None


   .. py:method:: network_timeout() -> int


   .. py:method:: set_ankihub_token(val: str | None) -> None


   .. py:method:: ankihub_token() -> str | None


   .. py:method:: set_ankihub_username(val: str | None) -> None


   .. py:method:: ankihub_username() -> str | None


   .. py:method:: allowed_url_schemes() -> list[str]


   .. py:method:: set_allowed_url_schemes(schemes: list[str]) -> None


   .. py:method:: always_allow_scheme(scheme: str) -> None


