I don't think there's something already written for what you are trying to accomplish (at least open source and in Python).
As for your second question, it depends on what you are trying to recognize. If the inputs can come from different sources -- e.g., different brands of playing cards with distinctive styles --, then you should probably use a machine learning-based algorithm (such as neural network or support vector machine [SVM]), in order to let it learn how to recognize unknown inputs. However, if the input is always the same in shape or style, then a simple image comparison algorithm will suffice (e.g., compare the pixels of the sliced upper-left corner with the pixels of each rank).
If you do decide to use a machine learning-based algorithm, I also think you don't need very complex features, as the suits and ranks don't really vary that much in shape or style, and you should be fine with using just the pixels of the upper left corner as features.
There's a toy OCR example here that you may find interesting. The lib that is used (LibSVM) also has a Python version, which I have used, and found very simple to work with.
Hope it helps.