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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fwordlesolver-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 b27ef62970f2b751effda0821c7fa984c5fc9383e061038fee3b35dcc037a97a
MD5 9541e501cb70c729082c4269b36932c1
BLAKE2b-256 13af61c38216a9d9ae1847190b124012bff9f652830d31d807dd6953b88909a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fwordlesolver-0.4.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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c38c567cf8040c0cdc832699fb7d4c17348175acbb4e95fe863e7b22d1d2d8e
MD5 0a1a4b0b8bbc6670374be550cc9ccbd0
BLAKE2b-256 ffbb7ad7033e43bb2d338e99a5da313fd76051beb8868c7e150ccb65987d2f9a

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