python_nbdev_starter

A sample of how to create a deck of cards lib using nbdev

A deck of cards demo of nbdev based on ideas from Think Python 2nd Edition by Allen B. Downey.

Real output of the Card and Deck API

Output of running the Card/Deck API via a short Python script (code shown in the image).

Install

Not published to PyPI. Install from source:

git clone https://github.com/moneebullah25/python_nbdev_starter
cd python_nbdev_starter && pip install -e .

How to use

This lib provides a Card class you can use to create, display, and compare playing cards:

Card(1,3)
3♦️

Suits are numbered according to this list:

suits
['♣️', '♦️', '❤️', '♠️']