A simple Flask server that displays a unicode playing card. I made this as part of a little card trick for a friend's birthday.
 
 
 
Go to file
Michael Zeevi 54aab9dc9f
fadein only for non default cards
2022-03-24 21:15:41 +02:00
templates fadein only for non default cards 2022-03-24 21:15:41 +02:00
README.md added reset_card route 2022-03-23 22:35:41 +02:00
app.py fadein only for non default cards 2022-03-24 21:15:41 +02:00
dockerfile app written and dockerized 2022-03-19 11:03:23 +02:00
makefile renamed docker image to match repo 2022-03-19 20:33:19 +02:00
requirements.txt set flask version 2022-03-23 22:35:01 +02:00

README.md

Flask card trick

Background

I used this as part of a little card trick for a friend's birthday.

About

This is a simple Flask server that displays a unicode playing card (see table below) which can be preset or updated. The default card is a card back (🂠).

Usage

  1. Requesting the route / will display the current card (default is a blank card back).

  2. The card can be set by requesting the route /u<new_card> (u is short for update), where new_card is a case-insensitive card name consisting of an index and suit (see table below).

    Example values: 3c (for 3 of Clubs), 10d (for 10 of Diamonds) or as (for Ace of Spades).

  3. The 2nd step can be repeated as many times as desired.

  4. Requesting the route /r will reset to the blank card back.

Unicode cards

new_card a (Ace) 2 3 4 5 6 7 8 9 10 or 0 j (Jack) q (Queen) k (King)
s (Spades) 🂡 🂢 🂣 🂤 🂥 🂦 🂧 🂨 🂩 🂪 🂫 🂭 🂮
h (Hearts) 🂱 🂲 🂳 🂴 🂵 🂶 🂷 🂸 🂹 🂺 🂻 🂽 🂾
d (Diamonds) 🃁 🃂 🃃 🃄 🃅 🃆 🃇 🃈 🃉 🃊 🃋 🃍 🃎
c (Clubs) 🃑 🃒 🃓 🃔 🃕 🃖 🃗 🃘 🃙 🃚 🃛 🃝 🃞