Skip to main content

Word puzzle solver library and CLI

Project description

Wordle Solver

This project provides a Wordle solver that can be used as a command-line interface (CLI) tool or imported as a module in your Python code. SOWPODS is used as lexicon.

Suggests new words that are most likely to reduce the total results. Can filter current list of words with

Installation

PyPI

pip install fwordlesolver

Manually

Clone the repository and navigate to the project directory:

git clone https://github.com/fmakdemir/fwordlesolver.git
cd fwordlesolver

Install Poetry if you haven't already. You can find the installation guide here.

Install the required dependencies using Poetry:

poetry install

Usage

Running as CLI

You can run the Wordle solver from the command line. Use the following command:

poetry run f-wordle-solver --word-size 6

You can select the size of the word with

Importing and Using the Solver

You can also import the solver into your Python code:

from fwordlesolver.solver import WordleSolver

solver = WordleSolver(6)
print(solver.get_suggestions())

solver.filter_word('blinks', '.x..x.')
print(solver.get_suggestions())

Running Tests

This package uses pytest for running tests.

To run the tests, use the following command:

pytest

This will execute all the test cases in the tests directory.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fwordlesolver-0.4.7.tar.gz (698.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fwordlesolver-0.4.7-py3-none-any.whl (698.0 kB view details)

Uploaded Python 3

File details

Details for the file fwordlesolver-0.4.7.tar.gz.

File metadata

  • Download URL: fwordlesolver-0.4.7.tar.gz
  • Upload date:
  • Size: 698.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.9.21 Linux/6.8.0-1020-azure

File hashes

Hashes for fwordlesolver-0.4.7.tar.gz
Algorithm Hash digest
SHA256 fef8e99c35dabf11557a06249dd3c080b3a3c40694d57934f442be550a965211
MD5 60cfbc066abaca86ddf6bc95358b942a
BLAKE2b-256 e3cfa3993e3523e80d4dec3a7067ec9ee3572b7163bae7b31aac5ad1f8343872

See more details on using hashes here.

File details

Details for the file fwordlesolver-0.4.7-py3-none-any.whl.

File metadata

  • Download URL: fwordlesolver-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 698.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.9.21 Linux/6.8.0-1020-azure

File hashes

Hashes for fwordlesolver-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5ae3851a99d594e70bd8cd1012edfdb1f583c29ee8e50c1b7939c4f6ec2b6974
MD5 56c4b9d5be40ad68b909bd749c21f49a
BLAKE2b-256 862181795b02da5f15af67a3df477ba4752554b82e4c8892fbf04a59203a4d2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page