Skip to main content

pywhist

A package containing the logic for the card game Whist and its variants.

How to install

pip install whist

How to use

whist contains a wide range of utility to work with playing cards and perform Whist game logic.

Playing with cards

>>> from whist.cards import Deck
>>> deck = Deck.full_deck()
>>> deck.shuffle()
>>> cards = [card.symbol for card in deck.cards]
>>> print(cards[:3])
['🃙', '🂥', '🂦']

Interactive play

$ python -m whist.game

=== Turn: north ===

  east: 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠
 south: 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠
  west: 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠 🂠

Your partner: south

Pile:

Your hand: 🃖 🃛 🃂 🃆 🃇 🃋 🂴 🂹 🂺 🂽 🂢 🂩 🂫

Actions:
 0: 🃖
 1: 🃛
 2: 🃂
 3: 🃆
 4: 🃇
 5: 🃋
 6: 🂴
 7: 🂹
 8: 🂺
 9: 🂽
10: 🂢
11: 🂩
12: 🂫
>

Metadata

Release files for whist 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whist 0.1.0
File Size Uploaded Provenance
whist-0.1.0.tar.gz 8.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for whist 0.1.0
File Interpreter ABI Platform
whist-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / whist-0.1.0.tar.gz

Download URL whist-0.1.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
714da2e6983b5a30fcc29e5449b0cbb8a5f85a1e724a4356f5f952404e6ac832
BLAKE2b-256 checksum
How to use checksums
68c44bb65b903ce30733d6dc9837fc1173ab1f4e66a3bdac541eb72ee5fd22d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.8.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Release files / whist-0.1.0-py3-none-any.whl

Download URL whist-0.1.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1358ae4f22c680b2041562a4026b8f059cfaa071a81889c5771ab1e0ff839ff
BLAKE2b-256 checksum
How to use checksums
715b11a6d0f8fbad214238b7a922260b0d964496edef45fdf91303c03608e479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.8.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Security for whist 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page