Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dsrathore1/pyscript

This is PyScript repo which I learnt about this new amazing technology, this is next level thing, I mention all the thing into repo. please check it out
https://github.com/dsrathore1/pyscript

css3 html5 javascript pyscript python python-library python3

Last synced: 8 days ago
JSON representation

This is PyScript repo which I learnt about this new amazing technology, this is next level thing, I mention all the thing into repo. please check it out

Awesome Lists containing this project

README

        

๐Ÿ PyScript ๐Ÿ



Run Python in your HTML

Python introduce a new tool and that's name is **`PyScript`**, which I explored and that is incredible. This may be tricky on first time but ***`PyScript's`*** team organized so well, anyone can explore it by self, use it and explore lots of things. I must say python did a great thing to introduce us a PyScript because this tool gives us a great functionality, we can add logic between the HTML code now. This is very easy to adopt, and you can start your work so quickly. I think this new tech will boom the industry it is very awesome for those who only wants to stay in **`Python env`** although they will definitely gonna love this. I like to share my thoughts on this new technology. #ThankYou ***`Python.org`*** who got this for us a brand new twisted tech for future, I must say these will be the next future into the tech industry. I'm definitely gonna use it from now.

Let's talk about its some features and tags, How to use in personal minor projects. I would say this may only for small projects, not preferable for major project because it still have some issues like lagging, data transferring taking much time, some syntax recognize by editor, etc. But at the end I really like **`#PyScript`**

***

## Feature 1๏ธโƒฃ :-
We can easily type python's code directly into **`HTML`** file like we add **`JS`** and start code into it.

**NOTE** :- First you have to add two lines before starting a code you can add between **`Head tag`**

```html

```

#### ***Syntax*** ๐Ÿ‘ฉโ€๐Ÿ’ป:-

Add this line between **`Body Tag`**

```html
....

print("Hello Python")

....
```

#### ***My CODE*** ๐Ÿ˜‰ :-

```html






PyScript

Introducing PyScript :-



print("Hello World")

```
You could try changing the code above to explore and play with PyScript yourself.

***

## Feature 2๏ธโƒฃ :-

You can operate code from different python file by adding some env path

#### ***Syntax*** ๐Ÿ‘ฉโ€๐Ÿ’ป:-

#### Python File ๐Ÿ‘จโ€๐Ÿ’ป
```python
def :
<---code-->

print("Something")
```

#### HTML File ๐Ÿ‘ฉโ€๐Ÿ’ป

```html








- paths :
-


Hello, I'm Python Code




from import

```

### **My Code** ;) :-

##### Python File Code (data.py) ๐Ÿ‘จโ€๐Ÿ’ป :-
```python
def namePrinter(name):
print(f"Hello, My name is {name}")

def table(x):
for i in range(1, 11):
print(f"{x} x {i} = {i*x}")
++i
```
##### HTML Code ๐Ÿ’Œ:-

```html







- paths :
- ./data.py

PyScript

Python Code :-




print("Hello Brother")


from data import *
namePrinter("David")


table(3)

````
You could try changing the code above to explore and play with PyScript yourself.

***

### References ๐Ÿ“”

1. You can check their GitHub repo (open source) by click on this link ๐Ÿ‘‰ **[Click Me](https://github.com/pyscript/pyscript/blob/main/docs/tutorials/getting-started.md)**

2. Official Website ๐Ÿ‘‰ **[Click Me](https://pyscript.net/)**

3. Import the appropriate PyScript files / CDN (Content Delivery Network) to your HTML page ๐Ÿ‘‰ **[Click Me](https://github.com/pyscript/pyscript#try-pyscript)**

4. Example Page ๐Ÿ‘‰ **[Click Me](https://pyscript.net/examples)**

5. Community Support ๐Ÿ‘‰ **[Click Me](https://community.anaconda.cloud/c/tech-topics/pyscript)**

***

# NOTE ๐Ÿ“ :-
- **This is an extremely experimental project, so expect things to break!**
- **PyScript has been only tested on Chrome at the moment.**


Thank You!! ๐Ÿงก