anki.cards
==========

.. py:module:: anki.cards


Attributes
----------

.. autoapisummary::

   anki.cards.CardId
   anki.cards.BackendCard
   anki.cards.FSRSMemoryState


Classes
-------

.. autoapisummary::

   anki.cards.Card


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

.. py:data:: CardId

.. py:data:: BackendCard

.. py:data:: FSRSMemoryState

.. py:class:: Card(col: anki.consts.anki.collection.Collection, id: CardId | None = None, backend_card: BackendCard | None = None)

   Bases: :py:obj:`anki._legacy.DeprecatedNamesMixin`


   Expose instance methods/vars as camelCase for legacy callers.


   .. py:attribute:: lastIvl
      :type:  int


   .. py:attribute:: ord
      :type:  int


   .. py:attribute:: nid
      :type:  anki.consts.anki.notes.NoteId


   .. py:attribute:: id
      :type:  CardId


   .. py:attribute:: did
      :type:  anki.consts.anki.decks.DeckId


   .. py:attribute:: odid
      :type:  anki.consts.anki.decks.DeckId


   .. py:attribute:: queue
      :type:  anki.consts.CardQueue


   .. py:attribute:: type
      :type:  anki.consts.CardType


   .. py:attribute:: memory_state
      :type:  FSRSMemoryState | None


   .. py:attribute:: desired_retention
      :type:  float | None


   .. py:attribute:: decay
      :type:  float | None


   .. py:attribute:: last_review_time
      :type:  int | None


   .. py:attribute:: col


   .. py:attribute:: timer_started
      :type:  float | None
      :value: None



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


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


   .. py:method:: question(reload: bool = False, browser: bool = False) -> str


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


   .. py:method:: question_av_tags() -> list[anki.sound.AVTag]


   .. py:method:: answer_av_tags() -> list[anki.sound.AVTag]


   .. py:method:: render_output(reload: bool = False, browser: bool = False) -> anki.consts.anki.template.TemplateRenderOutput


   .. py:method:: set_render_output(output: anki.consts.anki.template.TemplateRenderOutput) -> None


   .. py:method:: note(reload: bool = False) -> anki.notes.Note


   .. py:method:: note_type() -> anki.models.NotetypeDict


   .. py:method:: template() -> anki.models.TemplateDict


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


   .. py:method:: current_deck_id() -> anki.consts.anki.decks.DeckId


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

      Time limit for answering in milliseconds.



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


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


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


   .. py:method:: time_taken(capped: bool = True) -> int

      Time taken since card timer started, in integer MS.
      If `capped` is true, returned time is limited to deck preset setting.



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


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


   .. py:method:: set_user_flag(flag: int) -> None


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


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


