This was the beginnings of a library I was writing some seven years or so ago as part of the early stages of an online startup. The project never went anywhere (or else I left that project early on) but here's the code anyway.
Using the Deck
class, you can create a 52-card deck, from which you can deal
cards.
That's pretty much it. I can't remember what everything in constants.py does, and I'm pretty sure I cribbed it from somewhere, but I know not where.