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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fwordlesolver-0.4.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a2d47d900206d89ffeb1da549595a8d9c42e29e4b4d1f4e717ee941722a56477
MD5 8c200245fdfc94735945236d7dfb193f
BLAKE2b-256 2b890ec396e24c0a38d648e59696d19b56ba6a549d66bd56fcd4cd341b54c3b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fwordlesolver-0.4.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 692d0975f4b7860330461c4eec549c8453eb5ca66d1af269c44963cb7ae08ce8
MD5 f1a51c7caaec999439836de23f7fddd7
BLAKE2b-256 68f9f2a28a1dbd39844f4abdd235a71cf7e6ec75c589a7c0c34c31126f43d94c

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