How to iterate over a cards from a deck

How to iterate over a cards from a deck?

I have a specific deck and I want to access each cards through python looping.

maybe col.decks.cids(the_deck_id),

you could also try something like for cid in mw.col.find_cards(f'''deck:"{thedeckname}"'''), see https://addon-docs.ankiweb.net/#/getting-started?id=the-collection

2 Likes

Hello, I know this is an old post but I was wondering if you were successful in doing this? I am brand new to Anki’s architecture and making add-ons, but I have a simple add-on that I’d like to make that requires me to iterate through each individual card in a deck.

Just wanted to ask here first before I made a new post. If you could point me in the right direction, it would be much appreciated. Thanks!