DEV Community

watchakorn-18k
watchakorn-18k

Posted on

1

Pure Python No JS Only Pyscript 💪🏻

Here's an example of a Pyscript implementation that doesn't use JS.
Try it : https://watchakorn-18k.github.io/Pure-Python-Non-Js-With-Pyscript/

Pure Python Non Js With Pyscript

We make an effort to build an app website without JS, to say the least. But actually we just change the format to use. The modules available in pyodide are based on JS commands on python.

Using javascript, just import pyscript and tailwindcss and daisyui

Install

git clone https://github.com/watchakorn-18k/Pure-Python-Non-Js-With-Pyscript

cd Pure-Python-Non-Js-With-Pyscript
Enter fullscreen mode Exit fullscreen mode

Run

Tree File

│   config.toml
│   icon.png
│   index.html
│   README.md
│   
├───.vscode
│       settings.json
│       
├───components
│       ascii.html
│       ascii.py
│       binance_price.html
│       binance_price.py
│       clock.html
│       clock.py
│       index.html
│       index.py
│       input_app.html
│       input_app.py
│       layouts.py
│
├───css
│       pyscript.css
│
└───js
        pyscript.js

Enter fullscreen mode Exit fullscreen mode

Example

Input App : Example of creating a form to receive data from the client

Clock : An example of making a real-time display clock

Binance Price : This is an example of retrieving data with an API without using JavaScript.

ASCII : An example of an ASCII transformation that uses Python's built-in function chr() with ord() to demonstrate Python's capabilities.

Falling Snow : An example of creating snow falling from the sky using basic python, either map() or using dict instead of array in JS by reference from PasaComputer - Falling Snow | JavaScript 21 Days Challenge EP. 1 | สอน JavaScript เรียนรู้จากการลงมือทำ

SOURCE : https://github.com/watchakorn-18k/Pure-Python-Non-Js-With-Pyscript

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (1)

Collapse
 
waltharivonneresheim profile image
Walter Richtscheid

Interesting approaches

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

AWS GenAI Live!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️