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

Manually

Clone the repository and navigate to the project directory:

git clone https://github.com/fmakdemir/wordle-solver.git
cd wordle-solver

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 wordlesolver --count 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

To run the tests, use the following command:

pytest tests/

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.1.1.tar.gz (697.9 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.1.1-py3-none-any.whl (697.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fwordlesolver-0.1.1.tar.gz
  • Upload date:
  • Size: 697.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-51-generic

File hashes

Hashes for fwordlesolver-0.1.1.tar.gz
Algorithm Hash digest
SHA256 59b62302fd9008ac3412c08b119839acde63c038508cfb33b929506f30780067
MD5 b245af62f8be751cb82a0acef99be0b0
BLAKE2b-256 814b8bfefe1cb149b755db45da34c81c6303c60aefa8221da35c5a81eb3d8a60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fwordlesolver-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 697.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-51-generic

File hashes

Hashes for fwordlesolver-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 462640c4e73c08e4f973301bf5e2713fd28b6fde154fd0d282db63fba0f01afd
MD5 57d38d3300ba467d927157fcd137dd74
BLAKE2b-256 9641de6e023400a0ea97d7d913697bdb1f7832f7a895a0394a1708ee630d9fbc

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