Logic for decks with cards
Project description
pyCardDeck
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efda5e43abe3e4bd697cfe5fa03cab165450d314db28759f26e3028948367a43
|
|
| MD5 |
ffc542906c67182eefbb98e0c5c5d1af
|
|
| BLAKE2b-256 |
25be237bc1b037f87d07bc4b510b518c8e76485538f054e50dcb0ed8182c01f2
|
Provenance
The following attestation bundles were made for pycarddeck-1.5.0.tar.gz:
Publisher:
publish.yml on djetelina/pyCardDeck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycarddeck-1.5.0.tar.gz -
Subject digest:
efda5e43abe3e4bd697cfe5fa03cab165450d314db28759f26e3028948367a43 - Sigstore transparency entry: 1287277274
- Sigstore integration time:
-
Permalink:
djetelina/pyCardDeck@6e2555887ab1313e80b64006c12aab83e4444f4b -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/djetelina
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6e2555887ab1313e80b64006c12aab83e4444f4b -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b99764c28bf1df9d4450b369e8aff9aa68399e8f6195865ffb28189a187bcb98
|
|
| MD5 |
5f5d2f4b319a4ecce18a14938123ad92
|
|
| BLAKE2b-256 |
32acca77c7ec9161099b3b634e38733d80c85410fdc19f2f0b8e25847a111726
|
Provenance
The following attestation bundles were made for pycarddeck-1.5.0-py3-none-any.whl:
Publisher:
publish.yml on djetelina/pyCardDeck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycarddeck-1.5.0-py3-none-any.whl -
Subject digest:
b99764c28bf1df9d4450b369e8aff9aa68399e8f6195865ffb28189a187bcb98 - Sigstore transparency entry: 1287277339
- Sigstore integration time:
-
Permalink:
djetelina/pyCardDeck@6e2555887ab1313e80b64006c12aab83e4444f4b -
Branch / Tag:
refs/tags/v1.5.0 - Owner: https://github.com/djetelina
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6e2555887ab1313e80b64006c12aab83e4444f4b -
Trigger Event:
release
-
Statement type: