This Wordle API is made to return either a word or a list of words based on the parameters passed. This API was made because I couldn't find a API suited to my needs of my project. This API can only be accessed using Python. In case this API is used please attribute this website.
The API is deployed on pythonanywhere.com at manvendra27.pythonanywhere.com.
import requests
response = requests.get('manvendra27.pythonanywhere.com/<parameters>')
"parameters" are the conditions according to the user, which consists of strings i.e. the string which are present, not present, perfectly present in the word.
The following functions are supposed to be appended at the end of manvendra.pythonanywhere.com while calling the API
/good&perfect/good_string/perfect_string
import requests
response = requests.get('manvendra27.pythonanywhere.com/good&perfect/cra/___sh')
#returns a random word satisfying the conditions in a JSON format i.e {word: 'crash'}
/bad&perfect/bad_string/perfect_string
import requests
response = requests.get('manvendra27.pythonanywhere.com/bad&perfect/c/mar_h')
#returns a random word satisfying the conditions in a JSON format i.e {word: 'marsh'}
/all/good_string/bad_string/perfect_string
import requests
response = requests.get('manvendra27.pythonanywhere.com/all/r/pe/_a___')
#returns a random word satisfying the conditions in a JSON format i.e {word: 'mayor'}
If you want a list of all the words possible for a certain condition add "/list" to the end of any of the above conditions. eg)
- /good&perfect/good_string/perfect_string/list
- /bad&perfect/bad_string/perfect_string/list
- /all/good_string/bad_string/perfect_string/list
This would return a list of all the words in a JSON format i.e. {words: [mayor, marsh, march......]}
- I would like to simplify the code from having almost 4000-5000 lines of if-else statements.
- I would like the code to display the API swagger documentation on the home page.
- The code is currently deployed on pythonanywhere.com because I ran into some errors while trying to deploy it on heroku. I would like some help on this issue.