Is there any way to open the collection.anki21b file through Python?

You can use a package like pyzstd to do that (You have to bundle it with your add-on). I have an add-on that uses pyzstd to read files in the new format. See for an example:

2 Likes