Backend Flask App for Language Lunacy: where web scraping meets fun and effective language learning :D
This repository hosts the backend component of a language learning flashcard application. The Flask-based backend provides an API that fetches a range of common words in specified languages along with their English translations from a source website to aid in language learning through flashcards.
- GET Words Endpoint: Fetch a specific range of words in a specified language to assist users in learning new languages through flashcards.
- Error Handling: Effective error handling to manage potential issues like invalid language input or range specifications.
- GET
/words/<language>/<start>/<end>: Fetches a range of words (fromstarttoend) in the specifiedlanguage. Returns a list of words with details or an error message in JSON format.
- Clone the repository.
- Install the necessary Python packages:
pip install -r requirements.txt. - Run the Flask application:
flask run
To use the API, make a GET request to the endpoint with the appropriate parameters, for example: