py-sudoku


Namepy-sudoku JSON
Version 2.0.0 PyPI version JSON
download
home_pageNone
SummaryA simple Python package that generates and solves m x n Sudoku puzzles.
upload_time2024-10-15 18:36:40
maintainerNone
docs_urlNone
authorNone
requires_python>=2.7
licenseMIT License Copyright (c) 2019 Jeff Sieu 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 sudoku
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # py-sudoku

A simple Python package that generates and solves m x n Sudoku puzzles.

## Install

```sh
# Python 2
pip install py-sudoku

# Python 3
pip3 install py-sudoku
```

## Usage

### Basic usage

```py
from sudoku import Sudoku
# Initializes a Sudoku puzzle with 3 x 3 sub-grid and
# generates a puzzle with half of the cells empty
puzzle = Sudoku(3).difficulty(0.5)
puzzle.show()
# +-------+-------+-------+
# | 4 1   | 3     | 7 6   |
# |   9 3 |   7   | 4   1 |
# | 2     | 1 4   |   8 3 |
# +-------+-------+-------+
# | 9 5 8 |       |     7 |
# | 3 4   |     7 |   1   |
# |   7 2 | 8 9 3 | 5 4   |
# +-------+-------+-------+
# |   8   | 2     | 3 7 4 |
# |     4 |       | 1 9 5 |
# |       |   5   | 6     |
# +-------+-------+-------+

solution = puzzle.solve()
solution.show()
# +-------+-------+-------+
# | 4 1 5 | 3 8 9 | 7 6 2 |
# | 8 9 3 | 6 7 2 | 4 5 1 |
# | 2 6 7 | 1 4 5 | 9 8 3 |
# +-------+-------+-------+
# | 9 5 8 | 4 1 6 | 2 3 7 |
# | 3 4 6 | 5 2 7 | 8 1 9 |
# | 1 7 2 | 8 9 3 | 5 4 6 |
# +-------+-------+-------+
# | 5 8 9 | 2 6 1 | 3 7 4 |
# | 6 2 4 | 7 3 8 | 1 9 5 |
# | 7 3 1 | 9 5 4 | 6 2 8 |
# +-------+-------+-------+

solution.board
# [[4, 1, 5, 3, 8, 9, 7, 6, 2],
#  [8, 9, 3, 6, 7, 2, 4, 5, 1],
#  [2, 6, 7, 1, 4, 5, 9, 8, 3],
#  [9, 5, 8, 4, 1, 6, 2, 3, 7],
#  [3, 4, 6, 5, 2, 7, 8, 1, 9],
#  [1, 7, 2, 8, 9, 3, 5, 4, 6],
#  [5, 8, 9, 2, 6, 1, 3, 7, 4],
#  [6, 2, 4, 7, 3, 8, 1, 9, 5],
#  [7, 3, 1, 9, 5, 4, 6, 2, 8]]

solution.width
# 3

solution.height
# 3
```

### Creating puzzles

m x n rectangular puzzles can be initialized using the `Sudoku(width)` or `Sudoku(width, height)` constructors.

```py
# Initializes a 3 x 5 puzzle
puzzle = Sudoku(3, 5)
# Initializes a 4 x 4 puzzle
puzzle = Sudoku(4)
puzzle = Sudoku(4, 4)
```

Use ```solve()``` to get a solved puzzle, or ```difficulty(x)``` to create a problem.

```py
# Create a 3 x 5 sub-grid problem with 0.4 difficulty (40% of cells empty)
puzzle = Sudoku(3, 5).difficulty(0.4)

# Create a solved 4 x 4 problem
puzzle = Sudoku(4).solve()
```

### Displaying puzzles

```py
solution = Sudoku(5, 3).solve()

# Shows the puzzle only
solution.show()
# +----------------+----------------+----------------+
# | 09 10 11 04 06 | 05 01 03 12 13 | 08 14 15 02 07 |
# | 03 05 07 08 01 | 02 14 15 09 04 | 06 10 11 12 13 |
# | 12 02 13 14 15 | 07 10 06 11 08 | 01 03 04 05 09 |
# +----------------+----------------+----------------+
# | 13 14 06 11 08 | 15 07 09 02 12 | 10 01 05 03 04 |
# | 10 03 15 05 02 | 13 04 08 14 01 | 12 09 07 11 06 |
# | 01 07 04 09 12 | 03 05 10 06 11 | 13 02 08 15 14 |
# +----------------+----------------+----------------+
# | 07 13 08 15 05 | 12 11 04 10 03 | 14 06 09 01 02 |
# | 06 01 12 03 09 | 08 02 07 15 14 | 11 13 10 04 05 |
# | 04 11 10 02 14 | 06 09 01 13 05 | 15 08 12 07 03 |
# +----------------+----------------+----------------+
# | 08 12 02 06 10 | 01 13 11 05 07 | 03 04 14 09 15 |
# | 05 15 09 13 11 | 14 03 12 04 10 | 02 07 06 08 01 |
# | 14 04 01 07 03 | 09 06 02 08 15 | 05 11 13 10 12 |
# +----------------+----------------+----------------+
# | 11 09 03 12 13 | 10 15 14 07 02 | 04 05 01 06 08 |
# | 15 06 14 01 04 | 11 08 05 03 09 | 07 12 02 13 10 |
# | 02 08 05 10 07 | 04 12 13 01 06 | 09 15 03 14 11 |
# +----------------+----------------+----------------+


# Use print or show_full to display more information
print(solution)
solution.show_full()
# ---------------------------
# 15x15 (5x3) SUDOKU PUZZLE
# Difficulty: SOLVED
# ---------------------------
# +----------------+----------------+----------------+
# | 09 10 11 04 06 | 05 01 03 12 13 | 08 14 15 02 07 |
# | 03 05 07 08 01 | 02 14 15 09 04 | 06 10 11 12 13 |
# | 12 02 13 14 15 | 07 10 06 11 08 | 01 03 04 05 09 |
# +----------------+----------------+----------------+
# | 13 14 06 11 08 | 15 07 09 02 12 | 10 01 05 03 04 |
# | 10 03 15 05 02 | 13 04 08 14 01 | 12 09 07 11 06 |
# | 01 07 04 09 12 | 03 05 10 06 11 | 13 02 08 15 14 |
# +----------------+----------------+----------------+
# | 07 13 08 15 05 | 12 11 04 10 03 | 14 06 09 01 02 |
# | 06 01 12 03 09 | 08 02 07 15 14 | 11 13 10 04 05 |
# | 04 11 10 02 14 | 06 09 01 13 05 | 15 08 12 07 03 |
# +----------------+----------------+----------------+
# | 08 12 02 06 10 | 01 13 11 05 07 | 03 04 14 09 15 |
# | 05 15 09 13 11 | 14 03 12 04 10 | 02 07 06 08 01 |
# | 14 04 01 07 03 | 09 06 02 08 15 | 05 11 13 10 12 |
# +----------------+----------------+----------------+
# | 11 09 03 12 13 | 10 15 14 07 02 | 04 05 01 06 08 |
# | 15 06 14 01 04 | 11 08 05 03 09 | 07 12 02 13 10 |
# | 02 08 05 10 07 | 04 12 13 01 06 | 09 15 03 14 11 |
# +----------------+----------------+----------------+
```

### Seeds

Problems can be generated with a certain seed.

```py
# Generates a 3x2 puzzle with a given seed
Sudoku(3, 2, seed=100).solve().show()
# +-------+-------+
# | 5 6 3 | 1 2 4 |
# | 2 1 4 | 5 3 6 |
# +-------+-------+
# | 1 5 2 | 6 4 3 |
# | 3 4 6 | 2 5 1 |
# +-------+-------+
# | 6 3 5 | 4 1 2 |
# | 4 2 1 | 3 6 5 |
# +-------+-------+

```

### Importing boards

Puzzle boards can also be imported.

```py
board = [
    [0,0,7,0,4,0,0,0,0],
    [0,0,0,0,0,8,0,0,6],
    [0,4,1,0,0,0,9,0,0],
    [0,0,0,0,0,0,1,7,0],
    [0,0,0,0,0,6,0,0,0],
    [0,0,8,7,0,0,2,0,0],
    [3,0,0,0,0,0,0,0,0],
    [0,0,0,1,2,0,0,0,0],
    [8,6,0,0,7,0,0,0,5]
]
puzzle = Sudoku(3, 3, board=board)

print(puzzle)
# ---------------------------
# 9x9 (3x3) SUDOKU PUZZLE
# Difficulty: 0.74
# ---------------------------
# +-------+-------+-------+
# |     7 |   4   |       |
# |       |     8 |     6 |
# |   4 1 |       | 9     |
# +-------+-------+-------+
# |       |       | 1 7   |
# |       |     6 |       |
# |     8 | 7     | 2     |
# +-------+-------+-------+
# | 3     |       |       |
# |       | 1 2   |       |
# | 8 6   |   7 0 |     5 |
# +-------+-------+-------+

puzzle.solve().show_full()
# ---------------------------
# 9x9 (3x3) SUDOKU PUZZLE
# Difficulty: SOLVED
# ---------------------------
# +-------+-------+-------+
# | 9 8 7 | 6 4 2 | 5 3 1 |
# | 2 3 5 | 9 1 8 | 7 4 6 |
# | 6 4 1 | 5 3 7 | 9 8 2 |
# +-------+-------+-------+
# | 5 2 6 | 3 8 4 | 1 7 9 |
# | 1 7 3 | 2 9 6 | 8 5 4 |
# | 4 9 8 | 7 5 1 | 2 6 3 |
# +-------+-------+-------+
# | 3 1 9 | 8 6 5 | 4 2 7 |
# | 7 5 4 | 1 2 3 | 6 9 8 |
# | 8 6 2 | 4 7 9 | 3 1 5 |
# +-------+-------+-------+
```

### Invalid boards

Invalid boards give errors when attempted to be solved.

```py
board = [
    [0,0,7,0,4,0,0,0,0],
    [0,0,0,0,0,8,0,0,6],
    [0,4,1,0,0,0,9,0,0],
    [0,0,0,0,0,0,1,7,0],
    [0,0,0,0,0,6,0,0,0],
    [0,0,8,7,0,0,2,0,0],
    [3,0,0,0,0,0,0,0,0],
    [0,0,0,1,2,0,0,0,0],
    [8,6,0,0,7,6,0,0,5]
]
puzzle = Sudoku(3, 3, board=board)

puzzle.show_full()
# ---------------------------
# 9x9 (3x3) SUDOKU PUZZLE
# Difficulty: 0.74
# ---------------------------
# +-------+-------+-------+
# |     7 |   4   |       |
# |       |     8 |     6 |
# |   4 1 |       | 9     |
# +-------+-------+-------+
# |       |       | 1 7   |
# |       |     6 |       |
# |     8 | 7     | 2     |
# +-------+-------+-------+
# | 3     |       |       |
# |       | 1 2   |       |
# | 8 6   |   7 6 |     5 |
# +-------+-------+-------+

puzzle.solve().show_full()
# ---------------------------
# 9x9 (3x3) SUDOKU PUZZLE
# Difficulty: INVALID PUZZLE (GIVEN PUZZLE HAS NO SOLUTION)
# ---------------------------
# +-------+-------+-------+
# |       |       |       |
# |       |       |       |
# |       |       |       |
# +-------+-------+-------+
# |       |       |       |
# |       |       |       |
# |       |       |       |
# +-------+-------+-------+
# |       |       |       |
# |       |       |       |
# |       |       |       |
# +-------+-------+-------+
```

If you wish to raise an `UnsolvableSudoku` error when the board is invalid pass a `raising=True` parameter:

```py
puzzle.solve(raising=True)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "py-sudoku",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=2.7",
    "maintainer_email": null,
    "keywords": "SUDOKU",
    "author": null,
    "author_email": "Jeff Sieu <jeffsieu@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/02/ca/15117ec84458cc340666a18f86ab73c740a97030d11758baeda475fa084c/py_sudoku-2.0.0.tar.gz",
    "platform": null,
    "description": "# py-sudoku\n\nA simple Python package that generates and solves m x n Sudoku puzzles.\n\n## Install\n\n```sh\n# Python 2\npip install py-sudoku\n\n# Python 3\npip3 install py-sudoku\n```\n\n## Usage\n\n### Basic usage\n\n```py\nfrom sudoku import Sudoku\n# Initializes a Sudoku puzzle with 3 x 3 sub-grid and\n# generates a puzzle with half of the cells empty\npuzzle = Sudoku(3).difficulty(0.5)\npuzzle.show()\n# +-------+-------+-------+\n# | 4 1   | 3     | 7 6   |\n# |   9 3 |   7   | 4   1 |\n# | 2     | 1 4   |   8 3 |\n# +-------+-------+-------+\n# | 9 5 8 |       |     7 |\n# | 3 4   |     7 |   1   |\n# |   7 2 | 8 9 3 | 5 4   |\n# +-------+-------+-------+\n# |   8   | 2     | 3 7 4 |\n# |     4 |       | 1 9 5 |\n# |       |   5   | 6     |\n# +-------+-------+-------+\n\nsolution = puzzle.solve()\nsolution.show()\n# +-------+-------+-------+\n# | 4 1 5 | 3 8 9 | 7 6 2 |\n# | 8 9 3 | 6 7 2 | 4 5 1 |\n# | 2 6 7 | 1 4 5 | 9 8 3 |\n# +-------+-------+-------+\n# | 9 5 8 | 4 1 6 | 2 3 7 |\n# | 3 4 6 | 5 2 7 | 8 1 9 |\n# | 1 7 2 | 8 9 3 | 5 4 6 |\n# +-------+-------+-------+\n# | 5 8 9 | 2 6 1 | 3 7 4 |\n# | 6 2 4 | 7 3 8 | 1 9 5 |\n# | 7 3 1 | 9 5 4 | 6 2 8 |\n# +-------+-------+-------+\n\nsolution.board\n# [[4, 1, 5, 3, 8, 9, 7, 6, 2],\n#  [8, 9, 3, 6, 7, 2, 4, 5, 1],\n#  [2, 6, 7, 1, 4, 5, 9, 8, 3],\n#  [9, 5, 8, 4, 1, 6, 2, 3, 7],\n#  [3, 4, 6, 5, 2, 7, 8, 1, 9],\n#  [1, 7, 2, 8, 9, 3, 5, 4, 6],\n#  [5, 8, 9, 2, 6, 1, 3, 7, 4],\n#  [6, 2, 4, 7, 3, 8, 1, 9, 5],\n#  [7, 3, 1, 9, 5, 4, 6, 2, 8]]\n\nsolution.width\n# 3\n\nsolution.height\n# 3\n```\n\n### Creating puzzles\n\nm x n rectangular puzzles can be initialized using the `Sudoku(width)` or `Sudoku(width, height)` constructors.\n\n```py\n# Initializes a 3 x 5 puzzle\npuzzle = Sudoku(3, 5)\n# Initializes a 4 x 4 puzzle\npuzzle = Sudoku(4)\npuzzle = Sudoku(4, 4)\n```\n\nUse ```solve()``` to get a solved puzzle, or ```difficulty(x)``` to create a problem.\n\n```py\n# Create a 3 x 5 sub-grid problem with 0.4 difficulty (40% of cells empty)\npuzzle = Sudoku(3, 5).difficulty(0.4)\n\n# Create a solved 4 x 4 problem\npuzzle = Sudoku(4).solve()\n```\n\n### Displaying puzzles\n\n```py\nsolution = Sudoku(5, 3).solve()\n\n# Shows the puzzle only\nsolution.show()\n# +----------------+----------------+----------------+\n# | 09 10 11 04 06 | 05 01 03 12 13 | 08 14 15 02 07 |\n# | 03 05 07 08 01 | 02 14 15 09 04 | 06 10 11 12 13 |\n# | 12 02 13 14 15 | 07 10 06 11 08 | 01 03 04 05 09 |\n# +----------------+----------------+----------------+\n# | 13 14 06 11 08 | 15 07 09 02 12 | 10 01 05 03 04 |\n# | 10 03 15 05 02 | 13 04 08 14 01 | 12 09 07 11 06 |\n# | 01 07 04 09 12 | 03 05 10 06 11 | 13 02 08 15 14 |\n# +----------------+----------------+----------------+\n# | 07 13 08 15 05 | 12 11 04 10 03 | 14 06 09 01 02 |\n# | 06 01 12 03 09 | 08 02 07 15 14 | 11 13 10 04 05 |\n# | 04 11 10 02 14 | 06 09 01 13 05 | 15 08 12 07 03 |\n# +----------------+----------------+----------------+\n# | 08 12 02 06 10 | 01 13 11 05 07 | 03 04 14 09 15 |\n# | 05 15 09 13 11 | 14 03 12 04 10 | 02 07 06 08 01 |\n# | 14 04 01 07 03 | 09 06 02 08 15 | 05 11 13 10 12 |\n# +----------------+----------------+----------------+\n# | 11 09 03 12 13 | 10 15 14 07 02 | 04 05 01 06 08 |\n# | 15 06 14 01 04 | 11 08 05 03 09 | 07 12 02 13 10 |\n# | 02 08 05 10 07 | 04 12 13 01 06 | 09 15 03 14 11 |\n# +----------------+----------------+----------------+\n\n\n# Use print or show_full to display more information\nprint(solution)\nsolution.show_full()\n# ---------------------------\n# 15x15 (5x3) SUDOKU PUZZLE\n# Difficulty: SOLVED\n# ---------------------------\n# +----------------+----------------+----------------+\n# | 09 10 11 04 06 | 05 01 03 12 13 | 08 14 15 02 07 |\n# | 03 05 07 08 01 | 02 14 15 09 04 | 06 10 11 12 13 |\n# | 12 02 13 14 15 | 07 10 06 11 08 | 01 03 04 05 09 |\n# +----------------+----------------+----------------+\n# | 13 14 06 11 08 | 15 07 09 02 12 | 10 01 05 03 04 |\n# | 10 03 15 05 02 | 13 04 08 14 01 | 12 09 07 11 06 |\n# | 01 07 04 09 12 | 03 05 10 06 11 | 13 02 08 15 14 |\n# +----------------+----------------+----------------+\n# | 07 13 08 15 05 | 12 11 04 10 03 | 14 06 09 01 02 |\n# | 06 01 12 03 09 | 08 02 07 15 14 | 11 13 10 04 05 |\n# | 04 11 10 02 14 | 06 09 01 13 05 | 15 08 12 07 03 |\n# +----------------+----------------+----------------+\n# | 08 12 02 06 10 | 01 13 11 05 07 | 03 04 14 09 15 |\n# | 05 15 09 13 11 | 14 03 12 04 10 | 02 07 06 08 01 |\n# | 14 04 01 07 03 | 09 06 02 08 15 | 05 11 13 10 12 |\n# +----------------+----------------+----------------+\n# | 11 09 03 12 13 | 10 15 14 07 02 | 04 05 01 06 08 |\n# | 15 06 14 01 04 | 11 08 05 03 09 | 07 12 02 13 10 |\n# | 02 08 05 10 07 | 04 12 13 01 06 | 09 15 03 14 11 |\n# +----------------+----------------+----------------+\n```\n\n### Seeds\n\nProblems can be generated with a certain seed.\n\n```py\n# Generates a 3x2 puzzle with a given seed\nSudoku(3, 2, seed=100).solve().show()\n# +-------+-------+\n# | 5 6 3 | 1 2 4 |\n# | 2 1 4 | 5 3 6 |\n# +-------+-------+\n# | 1 5 2 | 6 4 3 |\n# | 3 4 6 | 2 5 1 |\n# +-------+-------+\n# | 6 3 5 | 4 1 2 |\n# | 4 2 1 | 3 6 5 |\n# +-------+-------+\n\n```\n\n### Importing boards\n\nPuzzle boards can also be imported.\n\n```py\nboard = [\n    [0,0,7,0,4,0,0,0,0],\n    [0,0,0,0,0,8,0,0,6],\n    [0,4,1,0,0,0,9,0,0],\n    [0,0,0,0,0,0,1,7,0],\n    [0,0,0,0,0,6,0,0,0],\n    [0,0,8,7,0,0,2,0,0],\n    [3,0,0,0,0,0,0,0,0],\n    [0,0,0,1,2,0,0,0,0],\n    [8,6,0,0,7,0,0,0,5]\n]\npuzzle = Sudoku(3, 3, board=board)\n\nprint(puzzle)\n# ---------------------------\n# 9x9 (3x3) SUDOKU PUZZLE\n# Difficulty: 0.74\n# ---------------------------\n# +-------+-------+-------+\n# |     7 |   4   |       |\n# |       |     8 |     6 |\n# |   4 1 |       | 9     |\n# +-------+-------+-------+\n# |       |       | 1 7   |\n# |       |     6 |       |\n# |     8 | 7     | 2     |\n# +-------+-------+-------+\n# | 3     |       |       |\n# |       | 1 2   |       |\n# | 8 6   |   7 0 |     5 |\n# +-------+-------+-------+\n\npuzzle.solve().show_full()\n# ---------------------------\n# 9x9 (3x3) SUDOKU PUZZLE\n# Difficulty: SOLVED\n# ---------------------------\n# +-------+-------+-------+\n# | 9 8 7 | 6 4 2 | 5 3 1 |\n# | 2 3 5 | 9 1 8 | 7 4 6 |\n# | 6 4 1 | 5 3 7 | 9 8 2 |\n# +-------+-------+-------+\n# | 5 2 6 | 3 8 4 | 1 7 9 |\n# | 1 7 3 | 2 9 6 | 8 5 4 |\n# | 4 9 8 | 7 5 1 | 2 6 3 |\n# +-------+-------+-------+\n# | 3 1 9 | 8 6 5 | 4 2 7 |\n# | 7 5 4 | 1 2 3 | 6 9 8 |\n# | 8 6 2 | 4 7 9 | 3 1 5 |\n# +-------+-------+-------+\n```\n\n### Invalid boards\n\nInvalid boards give errors when attempted to be solved.\n\n```py\nboard = [\n    [0,0,7,0,4,0,0,0,0],\n    [0,0,0,0,0,8,0,0,6],\n    [0,4,1,0,0,0,9,0,0],\n    [0,0,0,0,0,0,1,7,0],\n    [0,0,0,0,0,6,0,0,0],\n    [0,0,8,7,0,0,2,0,0],\n    [3,0,0,0,0,0,0,0,0],\n    [0,0,0,1,2,0,0,0,0],\n    [8,6,0,0,7,6,0,0,5]\n]\npuzzle = Sudoku(3, 3, board=board)\n\npuzzle.show_full()\n# ---------------------------\n# 9x9 (3x3) SUDOKU PUZZLE\n# Difficulty: 0.74\n# ---------------------------\n# +-------+-------+-------+\n# |     7 |   4   |       |\n# |       |     8 |     6 |\n# |   4 1 |       | 9     |\n# +-------+-------+-------+\n# |       |       | 1 7   |\n# |       |     6 |       |\n# |     8 | 7     | 2     |\n# +-------+-------+-------+\n# | 3     |       |       |\n# |       | 1 2   |       |\n# | 8 6   |   7 6 |     5 |\n# +-------+-------+-------+\n\npuzzle.solve().show_full()\n# ---------------------------\n# 9x9 (3x3) SUDOKU PUZZLE\n# Difficulty: INVALID PUZZLE (GIVEN PUZZLE HAS NO SOLUTION)\n# ---------------------------\n# +-------+-------+-------+\n# |       |       |       |\n# |       |       |       |\n# |       |       |       |\n# +-------+-------+-------+\n# |       |       |       |\n# |       |       |       |\n# |       |       |       |\n# +-------+-------+-------+\n# |       |       |       |\n# |       |       |       |\n# |       |       |       |\n# +-------+-------+-------+\n```\n\nIf you wish to raise an `UnsolvableSudoku` error when the board is invalid pass a `raising=True` parameter:\n\n```py\npuzzle.solve(raising=True)\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2019 Jeff Sieu  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.",
    "summary": "A simple Python package that generates and solves m x n Sudoku puzzles.",
    "version": "2.0.0",
    "project_urls": {
        "GitHub": "https://github.com/jeffsieu/py-sudoku",
        "Homepage": "https://github.com/jeffsieu/py-sudoku",
        "Issues": "https://github.com/jeffsieu/py-sudoku/issues"
    },
    "split_keywords": [
        "sudoku"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "23025f08d89c1531e8e08305e0719a186f083734bcbcf724ccf0ee0ca7c4693c",
                "md5": "f3904bc72aeea12f493f0644e7bce8f0",
                "sha256": "c41ff4bdfa69ee6f1950884a7473e38f9464bd300742916b2bea1a16b4c5f9d9"
            },
            "downloads": -1,
            "filename": "py_sudoku-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f3904bc72aeea12f493f0644e7bce8f0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=2.7",
            "size": 9721,
            "upload_time": "2024-10-15T18:36:39",
            "upload_time_iso_8601": "2024-10-15T18:36:39.109587Z",
            "url": "https://files.pythonhosted.org/packages/23/02/5f08d89c1531e8e08305e0719a186f083734bcbcf724ccf0ee0ca7c4693c/py_sudoku-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "02ca15117ec84458cc340666a18f86ab73c740a97030d11758baeda475fa084c",
                "md5": "f2785c6a66244eacb6322290995f53c2",
                "sha256": "7cc9bb0dd0f2fbcd10031fea69f3a3a10f1e08a28f6571548f555c99654c9a2b"
            },
            "downloads": -1,
            "filename": "py_sudoku-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f2785c6a66244eacb6322290995f53c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7",
            "size": 8881,
            "upload_time": "2024-10-15T18:36:40",
            "upload_time_iso_8601": "2024-10-15T18:36:40.965255Z",
            "url": "https://files.pythonhosted.org/packages/02/ca/15117ec84458cc340666a18f86ab73c740a97030d11758baeda475fa084c/py_sudoku-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-15 18:36:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jeffsieu",
    "github_project": "py-sudoku",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "py-sudoku"
}
        
Elapsed time: 0.37765s