<aside> <img src="/icons/coffee_orange.svg" alt="/icons/coffee_orange.svg" width="40px" /> If you are using the personal version, this is a tutorial on how to use the API with Python. Given it comes with a complete database of magic the gathering cards and sets, I would highly appreciate if you could please buy me a coffee here:

Support Nerdy Momo Cat on Ko-fi! ❤️. ko-fi.com/nerdymomocat

</aside>


<aside> 🐦 The twitter thread for the build process is here

https://twitter.com/nerdymomocat/status/1635839549866905601

</aside>

<aside> <img src="/icons/code_gray.svg" alt="/icons/code_gray.svg" width="40px" /> The replit code that you should fork

MagicTheGatheringNotion

  1. Set 3 environment variables: notion_api_key, cards_db_id, sets_db_id

<aside> <img src="/icons/code_gray.svg" alt="/icons/code_gray.svg" width="40px" /> I want to run it on my PC instead

That is cool, it will run 10x faster, so that is great!

  1. Create a new folder using poetry new mtg_notion
  2. Then cd into the directory using cd mtg_notion
  3. Install dependencies using
    1. poetry add scrython
    2. poetry add notional
    3. poetry add requests
  4. Add value for notion_api_key, cards_db_id, sets_db_id
  1. Run code using poetry run python3 main.py </aside>