Skip to main content

Logic for decks with cards

Project description

pyCardDeck

MIT License PyPI

Library aimed at anyone who wants to do any kind of deck manipulation in python. So probably game developers. The goal is to have the ultimate library for all of this, supporting all kinds of game types with clean and beautiful API - kind of like requests :)

How to use

First, install with pip:

pip install pyCardDeck

Then use in your code:

import pyCardDeck

my_deck = pyCardDeck.Deck(cards=[1, 2, 3], name='My Awesome Deck')

my_deck.shuffle()

card = my_deck.draw()

For more elaborate examples check out GitHub

Full documentation is available on ReadTheDocs.

For developers

The library supports Python 3.10+.

This library should be very easy to contribute to for first timers. Nothing is sacred, file issues, contribute where you feel it's useful and fun for you! If you need help, just ask.

Always aim to write clean and readable code, make sure the tests are passing, document in docstrings (rst format) and when writing new modules, classes or functions, add them to docs (we are using Sphinx autodocs)

Running tests

To run tests enter the pyCardDeck directory and run:

uv run pytest

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

pycarddeck-1.5.0.tar.gz (59.0 kB view details)

Uploaded Source

Built Distribution

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

pycarddeck-1.5.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file pycarddeck-1.5.0.tar.gz.

File metadata

  • Download URL: pycarddeck-1.5.0.tar.gz
  • Upload date:
  • Size: 59.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pycarddeck-1.5.0.tar.gz
Algorithm Hash digest
SHA256 efda5e43abe3e4bd697cfe5fa03cab165450d314db28759f26e3028948367a43
MD5 ffc542906c67182eefbb98e0c5c5d1af
BLAKE2b-256 25be237bc1b037f87d07bc4b510b518c8e76485538f054e50dcb0ed8182c01f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycarddeck-1.5.0.tar.gz:

Publisher: publish.yml on djetelina/pyCardDeck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycarddeck-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: pycarddeck-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pycarddeck-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b99764c28bf1df9d4450b369e8aff9aa68399e8f6195865ffb28189a187bcb98
MD5 5f5d2f4b319a4ecce18a14938123ad92
BLAKE2b-256 32acca77c7ec9161099b3b634e38733d80c85410fdc19f2f0b8e25847a111726

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycarddeck-1.5.0-py3-none-any.whl:

Publisher: publish.yml on djetelina/pyCardDeck

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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