# Reading Anki Source Code

**URL:** <https://forums.ankiweb.net/t/reading-anki-source-code/8552>\
**Category:** Development\
**Created:** [March 21, 2021, 9:00am UTC](https://forums.ankiweb.net/t/reading-anki-source-code/8552 "2021-03-21T09:00:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![KasidAnki](https://avatars.discourse-cdn.com/v4/letter/k/779978/32.png) [@KasidAnki](https://forums.ankiweb.net/u/KasidAnki)\
**Post date:** [March 21, 2021, 9:00am UTC](https://forums.ankiweb.net/t/reading-anki-source-code/8552/1 "2021-03-21T09:00:23Z")

</div>

I would like to read Anki’s source code so I can understand exactly how it decides which card to select next.

First, I searched through the anki github repo ([GitHub - ankitects/anki: Anki for desktop computers](https://github.com/ankitects/anki)) but couldn’t find any actual source code (python files?)… then I understood I needed to follow [these](https://github.com/ankitects/anki/blob/main/docs/windows.md) instructions to build from source in Windows so I did and everything seemed proceed as instructed without any errors but I can’t see where the actual source code is.

I was envisaging some python files but I can’t find anything other than bazel.exe which runs but still no idea where the actual source code is.

Please could someone explain how I can find the actual source code? I don’t even need to be able to run it. I just want to read the functions to understand how it works.

---

<div class="post-metadata">

**Author:** ![zhushenli](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/zhushenli/32/3691_2.png) [@zhushenli](https://forums.ankiweb.net/u/zhushenli)\
**Post date:** [March 21, 2021, 9:25am UTC](https://forums.ankiweb.net/t/reading-anki-source-code/8552/2 "2021-03-21T09:25:55Z")

</div>

> **[ankitects/anki](https://github.com/ankitects/anki/tree/main/qt/aqt)**
>
> main/qt/aqt

---

<div class="post-metadata">

**Author:** ![Rumo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/rumo/32/1505_2.png) [@Rumo](https://forums.ankiweb.net/u/Rumo)\
**Post date:** [March 21, 2021, 9:39am UTC](https://forums.ankiweb.net/t/reading-anki-source-code/8552/3 "2021-03-21T09:39:17Z")

</div>

The scheduling code is here: [anki/v2.py at main · ankitects/anki · GitHub](https://github.com/ankitects/anki/blob/main/pylib/anki/scheduler/v2.py).  
But I wasn’t exactly suggesting reading it in your other post. The manual and the FAQ dae linked are much more helpful.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [May 1, 2023, 3:19am UTC](https://forums.ankiweb.net/t/reading-anki-source-code/8552/4 "2023-05-01T03:19:12Z")

</div>

Closed on May 1, 2023, 3:19am UTC


