Create a cloud of keywords for a few programming languages, with optional highlights to specific keywords
- wordcloud:
pip install wordcloud - beautifulsoup4 (bs4):
pip install beautifulsoup4- used for HTML parsing
wordcloud depends on numpy and pillow.
To save the wordcloud into a file, matplotlib can also be installed.
Please see wordcloud's GitHub for more info on requirements and example usage.
The keywords_cloud module exposes a helper function get_keywords(language) which returns the list of reserved words for the chosen language. For Python, it simply returns keyword.kwlist.
from keywords_cloud import get_keywords
print(get_keywords("python"))Install pytest and run:
pytest -q