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.3.0.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.3.0-py3-none-any.whl (698.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fwordlesolver-0.3.0.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.3.0.tar.gz
Algorithm Hash digest
SHA256 576ff5664569512308c45d795de38455e20bf359c6dd50eb782ba8c831b4b3d8
MD5 3fe2e3a18dbd618e88d2aa4f60124a51
BLAKE2b-256 4a7c40bbe1fca6df588e441e334b267e19f740f8967b8da6847494d7d8d7d45b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fwordlesolver-0.3.0-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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e4b258f28f1e70beb823aec26329184efba672fd9e8cd2396e05fd25d7f645b
MD5 4c2d8f6d0b353784e2835513d94624cb
BLAKE2b-256 c354b46fbf0f31da5e28f41b220ac340bc02057e21eba16839960f4c765eea68

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