Aces High: Core Python Library
A Python library for modeling playing cards, decks, and core logic for traditional card games. Built with clean, testable design principles and designed to serve as the foundation for more complex gameplay logic.
🧠 Built to teach — this library powers the examples in the companion eBook:
Building Systems Like a Senior Engineer
Features
- 🎴 Card and Deck modeling using Pythonic, enum-safe data structures
- 🔁 Standard shuffling, dealing, and deck state management
- 🧪 Fully tested with
pytest, using a test-first design process - 🧹 Enforced code quality via
blackandruff - 📦 Easy-to-install package, published to PyPI
Installation
pip install aces-high-core-py
Usage
from aces_high import StandardDeck
deck = StandardDeck()
deck.shuffle()
hand = deck.deal(5)
for card in hand:
print(card)
Development
Clone the repo and install dependencies with uv:
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
Run tests:
pytest
Format and lint:
black src/ tests/
ruff check src/ tests/
Publishing
We use uv publish and workflow_dispatch in GitHub Actions for controlled PyPI deploys. See the Publish to PyPI workflow for more.
License
MIT License © Aaron Smith
See Also
📘 Aces High eBook — Learn how this library was designed and built from scratch, with a focus on practical system design and senior engineering practices.
Metadata
Release files for aces-high-core-py 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aces_high_core_py-0.1.1.tar.gz | 4.6 kB | Without provenance | Details for aces_high_core_py-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aces_high_core_py-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for aces_high_core_py-0.1.1-py3-none-any.whl |
Total release size: 8.9 kB
Release files / aces_high_core_py-0.1.1.tar.gz
| Download URL | aces_high_core_py-0.1.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6cc501f58ccfb73802c369c8d0fd607b0ae4cafd7c478e480a5e408b8ec1cb1
|
|
BLAKE2b-256 checksum How to use checksums |
e9b4c7ebb52975232bca7413e91d474ee72899ac4cbaed8d62d9f01927732d59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.7
|
Release files / aces_high_core_py-0.1.1-py3-none-any.whl
| Download URL | aces_high_core_py-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7adf620ca5a7d3e0f4a210b901963df2548b8c0b580ec5913ae3d0e9bf05c6be
|
|
BLAKE2b-256 checksum How to use checksums |
d86c85ca820fe06136f3c47f52be9037469872442c41830b9f262d276bd2902b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.7
|
Security for aces-high-core-py 0.1.1
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.