{"id":17867149,"url":"https://github.com/caarmen/sudokusolver","last_synced_at":"2025-04-02T22:13:37.415Z","repository":{"id":59626113,"uuid":"519866716","full_name":"caarmen/sudokusolver","owner":"caarmen","description":"Solve sudoku puzzles","archived":false,"fork":false,"pushed_at":"2022-09-18T19:05:54.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-08T12:30:42.312Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caarmen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-31T19:17:25.000Z","updated_at":"2022-08-07T14:01:16.000Z","dependencies_parsed_at":"2022-09-19T19:00:56.578Z","dependency_job_id":null,"html_url":"https://github.com/caarmen/sudokusolver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caarmen%2Fsudokusolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caarmen%2Fsudokusolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caarmen%2Fsudokusolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caarmen%2Fsudokusolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caarmen","download_url":"https://codeload.github.com/caarmen/sudokusolver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246899667,"owners_count":20851898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T09:44:32.675Z","updated_at":"2025-04-02T22:13:37.391Z","avatar_url":"https://github.com/caarmen.png","language":"Python","readme":"# Sudoku solver\n\nPython module which solves a sudoku puzzle\n\n[\u003cimg src=\"https://img.shields.io/badge/license-MIT-lightgrey.svg?maxAge=2592000\"\u003e](https://github.com/caarmen/sudokusolver/blob/main/LICENSE)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[\u003cimg src=\"https://github.com/caarmen/sudokusolver/actions/workflows/tests.yml/badge.svg\"\u003e](https://github.com/caarmen/sudokusolver/actions?query=workflow%3A%22Run+tests%22++)\n\n## Usage\n\nThe module reads sudoku strings in sdm format.\n\n### Program\n\nInvoke the program as follows to solve one puzzle:\n\n```bash\npython -m  sudokusolver --sdm 450109780027400013080627040805301200002095400314070000000000325030702194040503076\n```\n\nThis prints the following:\n\n```\n450109780027400013080627040805301200002095400314070000000000325030702194040503076\n456|139|782\n927|458|613\n183|627|549\n------------\n895|341|267\n672|895|431\n314|276|958\n------------\n761|984|325\n538|762|194\n249|513|876\n```\n\nIt's also possible to specify a file containing one sdm entry per line:\n\n```\npython -m sudokusolver --file /path/to/sudoku.sdm\n```\n\nUse `--help` to display full options:\n\n```commandline\n% python -m sudokusolver --help\nusage: __main__.py [-h] (--sdm SDM | --file FILE) [--mode [{parallel,sequential}]] [--algorithm [{recursive,iterative}]]\n\noptions:\n  -h, --help            show this help message and exit\n  --sdm SDM             Sudoku puzzle in sdm format\n  --file FILE           File containing sudoku puzzles in sdm format\n  --mode [{parallel,sequential}]\n                        How to process multiple boards. Default parallel\n  --algorithm [{recursive,iterative}]\n                        Default recursive\n\n```\n\n### Package\n\n```python\nfrom sudokusolver.board import Board\nfrom sudokusolver.solver import solve\n\nboard = Board(\"450109780027400013080627040805301200002095400314070000000000325030702194040503076\")\nsolution = solve(board)\nprint(solution.to_ss())\n```\n\nThis prints the following:\n\n``` \n456|139|782\n927|458|613\n183|627|549\n------------\n895|341|267\n672|895|431\n314|276|958\n------------\n761|984|325\n538|762|194\n249|513|876\n```\n\n## Disclaimer\n\nMany sudoku solver packages are already available on [PyPI](https://pypi.org/search/?q=sudoku+solver).\nThis project doesn't pretend to compete with them 😉 In fact, PyPI has some solvers which are more advanced than this\none, supporting boards of arbitrary size for example.\n\nThis project was simply a personal challenge. I made it open source in case any part of it could help anybody in some\ncapacity.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaarmen%2Fsudokusolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaarmen%2Fsudokusolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaarmen%2Fsudokusolver/lists"}