Security, software development and devops in a cloud world

Tag Pyscript

PyScript – MongoDB Data API

This article is about PyScript and the MongoDB Data API. I have not used the MongoDB Data API before. I know MongoDB and PyScript fairly well, so I thought I would document my journey to see if they will work… Continue Reading →

PyScript: Deno Deploy

This article is about deploying a PyScript application on Deno Deploy. If you are familiar with Deno and Deno Deploy then you already know that Deno is a JavaScript framework and deploy service. Why deploy PyScript on a JavaScript platform?… Continue Reading →

PyScript: Apache Web Server Setup

Some of the PyScript WASM files are large. For example, pyodide.asm.wasm is ~9.5 MB. Correctly setting up your web server to serve these files takes some consideration. You should configure several items in your web server. This article covers Apache… Continue Reading →

PyScript: Interfacing with WASM

PyScript is possible because of WASM. I wanted to see what is involved in calling functions located in a WASM module from Python. Turns out it is very easy to do at least at the function import and export level…. Continue Reading →

PyScript: Debugging and Error Management Strategies

Knowing that an error occurred is the first step to preventing and solving errors. There are many types of errors that PyScript applications will experience. Network failures, resources not being available and programming mistakes are just a few problems to… Continue Reading →

PyScript: Creating Installable Offline Applications

PyScript PWA Creating installable PyScript applications that cache assets and runs offline offer enormous potential for Python. In this article, I will show you how to create a Python application that installs on the desktop and on mobile devices. This… Continue Reading →

PyScript – Getting Application Data

In PyScript, as well as JavaScript, there are only a few methods of getting data into your program: Read data from the local file system Read data from the network Input data from the user Create data inside your application… Continue Reading →

PyScript: Third Party Criticism of PyScript

A recent article by Luciano Abriata criticized PyScript. He made two statements: Pyscript is way too slow and heavy to load. Does not support all of Python’s features and libraries. He then provided two example programs link and link. The… Continue Reading →

Pyscript: Files and File Systems – Part 2

In this article, I will show how to use the File System Access API. This API is a web platform API that enables developers to build powerful web apps that interact with files on the user’s local device. There are… Continue Reading →

Pyscript: Building from Source

This article discusses downloading and building PyScript from the source for Ubuntu 20.04 running within Windows WSL. For Linux, skip over the first section covering WSL setup. This article is written for the Python developer with limited experience building JavaScript/Node.js… Continue Reading →

PyScript: Good Videos to Watch

As momentum builds for PyScript, a few good resources are being created. This article is my attempt to keep track of the ones that are very good and/or have detailed knowledge. Please let me know if you know of one… Continue Reading →

Pyscript: Files and File Systems – Part 1

This will be the first of several articles that provides details on Pyscript files and file systems. I will discuss the different virtual file systems and how to access files located on the desktop. I have put each example in… Continue Reading →

Pyscript: Graphics

Introduction If you are familiar with using the Canvas with JavaScript, then you will quickly know how to draw on the Canvas with Python knowing a couple of minor items. If you are a Python developer new to drawing inside… Continue Reading →

PyScript: Create the py-script tag at Runtime

Introduction There are times that you want to write pure HTML and JavaScript code and during runtime download and execute Python code based upon various criteria. This article shows how to create the <py-script> tag, load code into the py-script… Continue Reading →

Pyscript: JavaScript Event Callbacks

Introduction Setting up Python event handlers in Pyscript requires special handling. Pyodide provides a proxy so that DOM events can use Python functions as callbacks. To create a proxy, call the pyodide.create_proxy() function [link].

The Python function myFunction is… Continue Reading →

Pyscript: Page Load Time

Introduction I have noticed an interesting anomaly between Pyodide and Pyscript. Pyscript takes about one second longer to load an HTML + Python page than Pyodide. Pyodide averages 2 seconds and Pyscript 3 seconds. Other interesting stats: Downloads: Pyodide downloads… Continue Reading →

PyScript: JavaScript and Python Interoperability

Introduction Pyscript/Pyodide supports excellent interoperability between JavaScript and Python. Python can call JavaScript and JavaScript can call Python. DOM events can use Python functions as callbacks. This article covers Python calling JavaScript functions and how to pass and receive data… Continue Reading →

PyScript: Loading Python Code in the Browser

Introduction Today, you can now use Pyscript to run Python code in the web browser. This has enormous potential for AI, ML, Data Scientists, and regular Python developers. I often develop backend applications in Django and Flask, and the possibilities… Continue Reading →

© 2024 John Hanley — Powered by WordPress

Theme by Anders NorenUp ↑