tetriskekw


Nametetriskekw JSON
Version 0.11.0 PyPI version JSON
download
home_pageNone
SummaryA terminal Tetris game with persistent highscores (curses + SQLite)
upload_time2025-09-04 06:16:49
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2025 Shayan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords tetris cli game terminal python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # termtris

**Terminal Tetris (termtris)** — a CLI Tetris-like game with persistent highscores.

<img src="images/snapshot.png" width="400" alt="Gameplay snapshot">

---

## Installation

### Recommended (for most users): `pipx` — isolated global CLI install

- Install pipx (if you don't have it):  
  - macOS (Homebrew): `brew install pipx` and then `pipx ensurepath`  
- Install termtris from PyPI:  
  `pipx install termtris`

**Install from TestPyPI (for testing a pre-release on TestPyPI):**  
`pipx install --pip-args="--index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple" termtris`

---

### Alternative: Install into a Virtual Environment (recommended for developers)

**macOS / Linux**  
1. `python3 -m venv .venv`  
2. `source .venv/bin/activate`  
3. `python3 -m pip install --upgrade pip`  
4. `python3 -m pip install termtris`

**Windows**  
1. `python -m venv .venv`  
2. `.venv\Scripts\activate`  
3. `python -m pip install --upgrade pip`  
4. `python -m pip install termtris`

---

### Install directly from TestPyPI (for testing)

`python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple termtris`

---

## If you see `externally-managed-environment` (PEP 668)

Some system Python installations (e.g., Homebrew on macOS, certain Linux distros) prevent `pip` from installing packages into the system site-packages.  
If you hit an error like:

`error: externally-managed-environment`

Recommended fixes (in order):

1. Use **pipx** (best for CLI tools) — shown above.  
2. Use a **virtual environment** — shown above.  
3. Only if you understand the risk: use `--break-system-packages` (not recommended):  
   `python3 -m pip install termtris --break-system-packages`

---

## Quick start / Usage

After installing, run:

- Start the game: `termtris`  
- Or run via module: `python -m termtris play`

### CLI commands

- `termtris` → Start the game  
- `termtris scores` → Show top scores  
- `termtris reset` → Reset highscores  

---

## Controls

| Key        | Action            |
|------------|-------------------|
| A / D      | Move left/right   |
| Left/Right | Move left/right   |
| Down       | Soft drop         |
| Q / E      | Rotate left/right |
| Space      | Hard drop         |
| P          | Pause             |
| X          | Quit              |
| C          | Toggle Colors     |

**Ghost Piece**: The game shows a boundary-style preview (ghost piece) of where the current piece will land, helping you plan your moves. The ghost piece updates automatically when you move or rotate the current piece.

Arrow keys are supported in addition to A/D.  
Colors require a color-capable terminal (`xterm-256color`, Windows terminal with proper support, etc).

---

## Configuration & Data

High scores are stored in the user config directory:  

`~/.config/termtris/termtris.db`

---

## Uninstall

- If installed with pipx: `pipx uninstall termtris`  
- If installed in a virtualenv: deactivate and remove the `.venv` folder  
- If installed with pip globally (not recommended): `python3 -m pip uninstall termtris`

---

## Testing / Development

To install the package locally for development:

1. `git clone https://github.com/shay-ff/termtris.git`  
2. `cd termtris`  
3. `python3 -m venv .venv`  
4. `source .venv/bin/activate`  
5. `python -m pip install -e .`  
6. `python -m termtris play`

---

## Notes

- If you published a test release on TestPyPI, the project page is available at:  
  `https://test.pypi.org/project/termtris/`  
- For a frictionless install experience for end-users, **pipx** is the recommended distribution method for CLI apps.

---

**Have fun!**

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tetriskekw",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "tetris, cli, game, terminal, python",
    "author": null,
    "author_email": "Shayan <tomohmmdali@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/17/4e/6bbbc9f8ed38d6d558b069335cb01bc3183470d9f68884584b9386afb640/tetriskekw-0.11.0.tar.gz",
    "platform": null,
    "description": "# termtris\n\n**Terminal Tetris (termtris)** \u2014 a CLI Tetris-like game with persistent highscores.\n\n<img src=\"images/snapshot.png\" width=\"400\" alt=\"Gameplay snapshot\">\n\n---\n\n## Installation\n\n### Recommended (for most users): `pipx` \u2014 isolated global CLI install\n\n- Install pipx (if you don't have it):  \n  - macOS (Homebrew): `brew install pipx` and then `pipx ensurepath`  \n- Install termtris from PyPI:  \n  `pipx install termtris`\n\n**Install from TestPyPI (for testing a pre-release on TestPyPI):**  \n`pipx install --pip-args=\"--index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple\" termtris`\n\n---\n\n### Alternative: Install into a Virtual Environment (recommended for developers)\n\n**macOS / Linux**  \n1. `python3 -m venv .venv`  \n2. `source .venv/bin/activate`  \n3. `python3 -m pip install --upgrade pip`  \n4. `python3 -m pip install termtris`\n\n**Windows**  \n1. `python -m venv .venv`  \n2. `.venv\\Scripts\\activate`  \n3. `python -m pip install --upgrade pip`  \n4. `python -m pip install termtris`\n\n---\n\n### Install directly from TestPyPI (for testing)\n\n`python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple termtris`\n\n---\n\n## If you see `externally-managed-environment` (PEP 668)\n\nSome system Python installations (e.g., Homebrew on macOS, certain Linux distros) prevent `pip` from installing packages into the system site-packages.  \nIf you hit an error like:\n\n`error: externally-managed-environment`\n\nRecommended fixes (in order):\n\n1. Use **pipx** (best for CLI tools) \u2014 shown above.  \n2. Use a **virtual environment** \u2014 shown above.  \n3. Only if you understand the risk: use `--break-system-packages` (not recommended):  \n   `python3 -m pip install termtris --break-system-packages`\n\n---\n\n## Quick start / Usage\n\nAfter installing, run:\n\n- Start the game: `termtris`  \n- Or run via module: `python -m termtris play`\n\n### CLI commands\n\n- `termtris` \u2192 Start the game  \n- `termtris scores` \u2192 Show top scores  \n- `termtris reset` \u2192 Reset highscores  \n\n---\n\n## Controls\n\n| Key        | Action            |\n|------------|-------------------|\n| A / D      | Move left/right   |\n| Left/Right | Move left/right   |\n| Down       | Soft drop         |\n| Q / E      | Rotate left/right |\n| Space      | Hard drop         |\n| P          | Pause             |\n| X          | Quit              |\n| C          | Toggle Colors     |\n\n**Ghost Piece**: The game shows a boundary-style preview (ghost piece) of where the current piece will land, helping you plan your moves. The ghost piece updates automatically when you move or rotate the current piece.\n\nArrow keys are supported in addition to A/D.  \nColors require a color-capable terminal (`xterm-256color`, Windows terminal with proper support, etc).\n\n---\n\n## Configuration & Data\n\nHigh scores are stored in the user config directory:  \n\n`~/.config/termtris/termtris.db`\n\n---\n\n## Uninstall\n\n- If installed with pipx: `pipx uninstall termtris`  \n- If installed in a virtualenv: deactivate and remove the `.venv` folder  \n- If installed with pip globally (not recommended): `python3 -m pip uninstall termtris`\n\n---\n\n## Testing / Development\n\nTo install the package locally for development:\n\n1. `git clone https://github.com/shay-ff/termtris.git`  \n2. `cd termtris`  \n3. `python3 -m venv .venv`  \n4. `source .venv/bin/activate`  \n5. `python -m pip install -e .`  \n6. `python -m termtris play`\n\n---\n\n## Notes\n\n- If you published a test release on TestPyPI, the project page is available at:  \n  `https://test.pypi.org/project/termtris/`  \n- For a frictionless install experience for end-users, **pipx** is the recommended distribution method for CLI apps.\n\n---\n\n**Have fun!**\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Shayan\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "A terminal Tetris game with persistent highscores (curses + SQLite)",
    "version": "0.11.0",
    "project_urls": null,
    "split_keywords": [
        "tetris",
        " cli",
        " game",
        " terminal",
        " python"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d8047eaefdb3488f8bc2cd5f2b350e7027de3995aa374f4e54b95c2c40be528d",
                "md5": "21820cc74d9614a7c34ee8000aeaee37",
                "sha256": "434f667773e286000ad93a37e01f6121757d504f5ec92499c7ff9d5a260f15ff"
            },
            "downloads": -1,
            "filename": "tetriskekw-0.11.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "21820cc74d9614a7c34ee8000aeaee37",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 11287,
            "upload_time": "2025-09-04T06:16:48",
            "upload_time_iso_8601": "2025-09-04T06:16:48.186826Z",
            "url": "https://files.pythonhosted.org/packages/d8/04/7eaefdb3488f8bc2cd5f2b350e7027de3995aa374f4e54b95c2c40be528d/tetriskekw-0.11.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "174e6bbbc9f8ed38d6d558b069335cb01bc3183470d9f68884584b9386afb640",
                "md5": "d7255148cee343be2e8fb58ac2760aef",
                "sha256": "cc84a59348894193726d977ad256bbcb07fe3307be8082213a86f1b618e664a2"
            },
            "downloads": -1,
            "filename": "tetriskekw-0.11.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d7255148cee343be2e8fb58ac2760aef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11704,
            "upload_time": "2025-09-04T06:16:49",
            "upload_time_iso_8601": "2025-09-04T06:16:49.711653Z",
            "url": "https://files.pythonhosted.org/packages/17/4e/6bbbc9f8ed38d6d558b069335cb01bc3183470d9f68884584b9386afb640/tetriskekw-0.11.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-04 06:16:49",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "tetriskekw"
}
        
Elapsed time: 1.96899s