A tetris I made some time ago. It has all the functionnalities of a modern Tetris
pygame : pip install pygame
numpy : pip install numpy
python3 pytris.py
or on Windows you can simply double-click on pytris.py
A : Swap current tetromino with reserve
S : Rotate left
D : Rotate right
W : Rotate 180°
R : Reset game
Arrow Up : Instant fall
Arrow Down : Fast fall
Arrow Left/Right : Left/Right
Space : Pause/Unpause
Escape : Quit
The tetris.py file contains the Tetris class, which could be used to render a Tetris game in any way you want.
The pytris.py file is a quickly done script using pygame that uses this class.