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.
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 | |
|---|---|---|---|
| aces_high_core_py-0.1.1.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aces_high_core_py-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
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
|