A web-based Sudoku solver built using Python and Python only
The motivation is to demonstrate how Backtracking algorithm works.
Some of the key highlights of this Sudoku solver app:
- Ability to generate a random valid Sudoku puzzle
- Solves a Sudoku puzzle using backtracking
- Able to validate if a Sudoku board
- Hosted using Google App Engine
Make sure you have poetry installed on your machine.
poetry install # Optional: Installing dependencies only poetry install --no-root # Optional: Updating dependencies to their latest versions poetry update
Setup Pre-commit Hooks
Before you begin your development work, make sure you have installed pre-commit hooks.
Some example useful invocations:
pre-commit install: Default invocation. Installs the pre-commit script alongside any existing git hooks.
pre-commit install --install-hooks --overwrite: Idempotently replaces existing git hook scripts with pre-commit, and also installs hook environments.
pre-commit run: Run hooks.
To run on debug mode locally on your browser:
poetry run python3 main.py --debug=True --port=8080
http://localhost:8080/ on your browser.
This section is only required if you intend to deploy to GAE.
For reference, do check this out.
Configure all dependencies you will need for your web service in your
# This command exports the poetry lock file to other formats. poetry export -f requirements.txt --output requirements.txt
Google App Engine
# To deploy app configuration gcloud init gcloud app deploy app.yml --project xxx # Optional: To stream logs gcloud app logs tail -s default
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
- Fork this
- Create your feature branch (git checkout -b feature/fooBar)
- Please make sure you have installed the pre-commit hook and make sure it passes all the lint and format check
- Commit your changes (git commit -am 'Add some fooBar')
- Push to the branch (git push origin feature/fooBar)
- Create a new Pull Request