Skip to main content

A playing cards package

Project description

cardnacki

Package for working w playing cards

0.3.0 (2025-08-06):

  • introduced breaking changes to Pile & piles.py
  • piles.py has been removed; it relied on the old version of Pile and wasn't useful
  • Pile now behaves like a generic stack

0.2.1 (2025-08-03):

  • bug fix

0.2.0 (2025-08-03):

  • introduced breaking changes to Card
  • Card is now frozen=True, slots=True !!
    • removed attributes:
      • face_up (bool)
      • is_flippable (bool)
      • attributes (dict)
    • removed methods:
      • flip
      • flip_face_up
      • flip_face_down
    • rank_full_name, full_name, rank_suit all moved from post_init to properties
  • hash-ability (via frozen) is seemingly worth more than flip-ability and custom attributes
  • slots should provide a speed improvement as well w very few to no foreseen disadvantages

0.1.5 (2025-08-03):

  • re-wrote describe_poker_hand.py to improve performance

0.1.4 (2025-08-03):

  • added start_shuffled parameter to Deck initializer; default is False

0.1.3 (2025-07-20):

  • fixed import bug

0.1.2 (2025-07-20):

  • added describe_poker_hand.py which contains a function of the same name that accepts and list of Card and returns a string representation of a poker hand outcome (ex. 'Full House' or 'High Card')
    • also accepts an optional parameter of a tuple of winning hand possibilities (ex. adding in 'Royal Flush' or 'Jacks or Better')

0.1.1 (2024-12-29):

  • added Pile.to_rank_suits() method (the inverse of Pile.create_from_rank_suits() introduced in 0.1.0)

0.1.0 (2024-12-28):

  • introduced breaking changes to Pile
    • initializer no longer requires a type_ attribute
    • all attributes besides 'cards' must now be a kwarg
    • getter now correctly needs to get one of its own cards, instead of constructing new cards from a random deck
    • alternate constructor must now be given a deck, so it doesn't override any props specific to that deck (for example, a SetbackDeck receiving a game_point attribute)
  • potential breaking change to Card
    • removed attribute "game_points"
    • added attribute dict "attributes", which a caller can added as needed

0.0.14 (2024-12-25):

  • added getter for pile to access by rank_suit

0.0.13 (2024-12-25):

  • added pile.PileStats.suit_has_any_ranks

0.0.12 (2024-12-25):

  • added pile.PileStats

0.0.11 (2024-03-13):

  • added back in a hard-coded id attribute

0.0.9 (2024-02-29):

  • added equality method to Card

0.0.6 (2024-01-11):

  • added an attribute for 'rank_full_name' e.g. "King"
  • added an attribute for 'card_full_name' e.g. "Ace of Spades"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cardnacki-0.3.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cardnacki-0.3.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file cardnacki-0.3.0.tar.gz.

File metadata

  • Download URL: cardnacki-0.3.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for cardnacki-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9c2ad602fdbacf56b80e43800e3afdb5e9a8fe754b17c0e1b5725aaa5b13cc8a
MD5 03d2959420b03d6fca11ae61c57f17ff
BLAKE2b-256 11d2a24ed58ed088ec344605b90bf55496e5ee4d112441aff4f03adca6201962

See more details on using hashes here.

File details

Details for the file cardnacki-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: cardnacki-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for cardnacki-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68c02c93dcb78ddd13db57561f3cf6cc0327e61a85ab0c1c44e18015214efec4
MD5 71aaa2b12fcd88f01b55aa588268b3d4
BLAKE2b-256 94dce32b3f22535cdf58f478324374c514123a7447f3c8c5034d9c099caff514

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page