Follow BigDATAwire:

May 2, 2022

Anaconda Unveils PyScript, the ‘Minecraft for Software Development’

During his keynote at PyCon 2022, Anaconda CEO Peter Wang unveiled a new project: PyScript.

PyScript is described as a framework that uses a mixture of Python and standard HTML to allow users to create Python applications in a browser.

“PyScript aims to give users a first-class programming language that has consistent styling rules, is more expressive, and is easier to learn,” said one of its creators, Principal Software Architect Fabio Pliger, in a company blog post.

In a more detailed technical blog post, Pliger says, “One of the ways I like to think of PyScript is [as] ‘the Minecraft for software development’: a framework that provides basic blocks for users to create their own worlds (applications) or new blocks (PyScript components and widgets) that others can use.”

Key elements of PyScript include how it allows users access to Python in the browser through its enabling of drop-in content, its external file hosting courtesy of the Pyodide project, and its application hosting without reliance on server-side configuration. Users can also access other programs within the Python libraries ecosystem including NumPy, pandas, and scikit-learn. PyScript also includes bi-directional communication between Python and Javascript objects and namespaces. Users can manage their software environment by defining which packages and files are included for running page code. Visual application developers can use curated UI components including buttons, containers, and text boxes. Additionally, PyScript’s flexible framework allows for creating and sharing pluggable and extensible components directly in Python.

This flexibility reflects the goal the program’s developers had of offering a reliable and accessible framework to create and ship applications for any hardware and software platform, “while still having fun.” Instead of starting a new technology stack from scratch, PyScript’s authors wanted to mine options from the rich Python ecosystem. They wanted to offer a clean API that supports standard HTML that can also extend HTML to read custom components while providing a pluggable and extensible components system, all on an adaptable platform.

“With a little bit of flexibility, we believed that the browser would be a great platform that we could adapt to achieve our goals of providing a reliable, accessible, and fun experience for PyScript users,” said Pliger. “The browser works everywhere (from laptops, tablets, to phones), and is secure, powerful, and stable, making it, in our opinion, the perfect starting point for carrying out PyScript’s goals.”

Source: Anaconda

Pliger cites advancements in WebAssembly/WASM, Emscripten, and Pyodide (a Python distribution for the browser, based on WebAssembly) as reasons browsers have promising virtual machine capabilities, but there are issues involved such as a lack of compatibility between Python and UI languages like modern HTML, CSS, and JavaScript, which can be difficult to learn. PyScript enables Python to leverage these languages to address common challenges throughout the web application development cycle, from building to packaging to distribution and deployment.

“The point is, that by registering new web components that are simple and very expressive, users don’t need to waste their time learning CSS and other specific web dev technologies,” said Pliger.

The authors of PyScript see the current alpha stage version, which they call unstable and limited but functional, as just the beginning. They envision a future where it becomes a whole new paradigm for application programming and development as PyScript and the core technologies used to build it continue to mature and improve.

For more detailed information about how PyScript works, visit Pliger’s technical blog post. To see the GitHub files and to learn how to contribute to the project, visit this link.

Related Items:

Anaconda’s Commercial Fee Is Paying Off, CEO Says

Data Science and AI Predictions for 2022

Anaconda’s 2021 State of Data Science Report Highlights Support for Open Source, Impacts from COVID-19

BigDATAwire