Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Build a Knowledge Bot With PyScript's Fetch API and Wikimedia

Samuel Chan via YouTube

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

Reviews

Start your review of Build a Knowledge Bot With PyScript's Fetch API and Wikimedia

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.