Overview
Learn to build a knowledge bot using PyScript's Fetch API and Wikimedia in this 44-minute tutorial. Explore lesser-known features of PyScript to create a tool that retrieves Wikipedia summaries for any given topic or keyword. Follow along as the instructor demonstrates how to code the front-end, implement py-inputbox and py-button, utilize pyodide.http.open_url and pyodide.http.pyfetch, interact with the Wikimedia REST API, and incorporate JavaScript functionality for clipboard operations. Discover how to enhance the user interface with CSS styling, resulting in a practical application for quick research and information retrieval during conversations or when encountering unfamiliar terms.
Syllabus
Intro: Let's build a summary bot!
PyScript VS Code Extension
Coding up the front end
py-inputbox
py-button
pyodide.http.open_url & pyodide.http.pyfetch
Wikimedia REST API for wikipedia summary
using pyfetch from pyscript wrapper of Fetch API in js
using paths in py-env
pyscript.write
copy to clipboard javascript / js
sprinling some css for a summer look!
Taught by
Samuel Chan