This post is from Grokking Python, a free newsletter available on Substack from Educative, the world’s best learning platform for software developers. It’s where we’ll share our team’s best Python-related info and resources—stuff we think could really enhance your understanding.
Hey Grokking Python readers!
What is PyScript?
- Can interleave Python in HTML (like PHP)
- Full access to the Python Standard Library
- Can fully access the web page (DOM)
- Is truly serverless
- Enables 'import d3'
- Requires ZERO installation
- Is performant (includes utilizing GPU)
During a live coding demonstration, Wang impressed the crowd by embedding an interactive Python data visualization of NYC taxicabs in an HTML file in mere minutes.
Who is PyScript for?
If you've worked with Python, you may already know that trying to make desktop native applications with Python is frustrating, and making mobile native apps with Python is nearly impossible. This hurdle makes it difficult for Python developers to share their work with a broader audience.
Wang described the Python interpreter as having an under-the-hood engine "like a Honda Civic with mounting bolts for a warp drive." While just about anyone can learn Python syntax quickly, there is a steep learning curve to familiarizing yourself with the rich ecosystem of libraries and frameworks that make Python great.
PyScript flattens that learning curve dramatically. Now, frontend web developers, Python developers, and data scientists will all be able to share models, dashboards, data visualizations, and more without learning additional infrastructure technology. How to learn Python in 5 easy steps (for beginners) is a great article to read on Educative if you'd like to brush up on those Python skills.
How does PyScript work?
PyScript isn't a variation of the Python language. Instead, it combines multiple open source technologies to allow users to add logic and create sophisticated applications in the web browser. PyScript works by compiling CPython to WebAssembly (WASM) and Emscripten via Pyodide. WASM is a low-level assembly-like language released in 2017 that provided a way for developers to run code written in languages like C++ or Rust on the web at near-native speeds.
Given the interest in PyScript and some of the common questions that are coming up, I figured I'd share some of my slides which may answer some questions.— Peter Wang (@pwang) May 2, 2022
Also I highly recommend checking out our engineering blog post on it: https://t.co/I8i3BeTNJA pic.twitter.com/JBtBfIQwso
You can take a look at some of the demos that were presented at PyCon down below.
PyCon US 2023
If you're a passionate Pythonista and would like to stay in the loop about future Python events, stick around. We're all lifelong learners here at Educative, and we want everyone to have access to great learning experiences.
The following PyCon US will be held in Salt Lake City, Utah, from April 19th to April 27th, 2023. We'll keep you posted when registration opens up, and we hope to see you there!
Start a discussion
Will you be attending the next PyCon? Was this post helpful? Let us know in the comments below!