Metadata-Version: 2.1
Name: cards-deck
Version: 0.0.3
Summary: An example repository for nbdev
Home-page: https://github.com/fastai/cards_deck
Author: Isaac Flath and Jeremy Howard
Author-email: info@fast.ai
License: Apache Software License 2.0
Keywords: nbdev
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

Deck of Cards
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

This repo uses code based on [Allen Downey’s](http://allendowney.com/)
[ThinkPython2](https://github.com/AllenDowney/ThinkPython2).

## Install

After cloning this repository:

`pip install -e .`

<div>

> **Caution**
>
> This project is an example of how to create python packages with
> [nbdev](https://github.com/fastai/nbdev). It’s not a fully-fledged
> card dealing library!

</div>

## How to use

Playing cards in python!

``` python
from cards_deck.deck import Deck
d = Deck()
print(f'Number of playing cards in the deck: {len(d)}')
```

    Number of playing cards in the deck: 52

``` python
card = d.pop()
card, len(d)
```

    (K♠️, 51)

See [the docs](https://isaac-flath.github.io/deck_of_cards/) for more
info.

### The `draw_cards` cli:

We included a handy cli you can use to draw cards as well!

``` python
!draw_cards -h
```

    usage: draw_cards [-h] [--replace] [--outfile OUTFILE] n

    Draw `n` cards optionally with replacement

    positional arguments:
      n                  number of cards to draw

    optional arguments:
      -h, --help         show this help message and exit
      --replace          whether or not draw with replacement (default: False)
      --outfile OUTFILE  output file, defaults to stdout

``` python
!draw_cards 10
```

    5❤️
    6❤️
    10♠️
    4♣️
    A♣️
    A❤️
    9❤️
    4❤️
    K❤️
    3♣️
