Skip to main content

The popular word game recreated in Python, deployable with custom answers.

Project description

Wordle

View on GitHub and PyPI.

Wordle is super fun and popular game. Unfortunately, it's a little nonstandard, but the logic behind it is quite simple which is why it's now a Python library.

import wordle

game = wordle.Wordle(word = 'HELLO', realWords = False)
game.run()

# Or even more simply:
wordle.Wordle(word = 'hello', realWords = True).run() # runs in one line. 

Instantiate a game object using game = wordle.Wordle(). The two positional requirements of the Wordle class are word and realWords. word is the answer to the game. It must be a real, five-letter word. If it isn't, the package will raise an error and you'll have to change your instantiation to reflect a real word. realWords is a boolean. If it's True, the package will check user guesses against a comprehensive inbuilt database of thousands of five-letter words. If it's False, any guess (real or not) will be accepted.

In the game of Wordle, part of the challenge is that guesses must be real words. This prevents users from guessing "aeiou" as their first attempt, for example. That's why you must tell the game object whether it should check for real words or not.

Note: In version 1.5.10, the issue disallowing a lower-case word has been patched. word = 'hello' and word = 'HELLO' are both acceptable.

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

wordle-python-1.6.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

wordle_python-1.6.0-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

Details for the file wordle-python-1.6.0.tar.gz.

File metadata

  • Download URL: wordle-python-1.6.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for wordle-python-1.6.0.tar.gz
Algorithm Hash digest
SHA256 7ff6388480045552fe8935aff49bfc293e0453d1aa9ed7238faeb05a46dc6020
MD5 e5964c62290dbef1a443c5460c4910f6
BLAKE2b-256 bb504dc9f810785d44bc7544adcaf5b2499d7de2851061967e8ca3d6203b1009

See more details on using hashes here.

File details

Details for the file wordle_python-1.6.0-py3-none-any.whl.

File metadata

  • Download URL: wordle_python-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 2.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for wordle_python-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 521f57ba13b2089fce4769027e0cd44f7882fef6fb635f407f9c9a88ca3b3f71
MD5 31f0562934c72ec3d39c5c1efbd6cd4b
BLAKE2b-256 9ca4872b28723877cf9728787b0762446aa7682865b1f72b90654a3ece399cab

See more details on using hashes here.

Supported by

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