Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.15.4 instead.
Reason given by maintainers: When the site.getusersitepackages() is None, PyScript encounters a fatal error.

PyScript

PyScript is a programming language built on top of Python. It combines some syntax from Python and JavaScript, so if you're already familiar with Python, JavaScript or both, it should be quite easy to learn.

Introduction 📖

The name of "PyScript" was previously used by a well-known framework designed to run Python directly in the browser. Designed from the outset with inspiration from both Python and JavaScript, this language emphasizes human readability. Its name was derived by combining Python and JavaScript. Please note that this language is an independent programming language project written in Python and has no affiliation with the aforementioned PyScript framework.

This language wasn't designed to compete with other modern programming languages, but rather as a learning for understanding how programming languages ​​work and how human written code can be understood by machines. Furthermore, this language was created as a relatively complex project. Using Python as the foundation for PyScript, it's easy to understand how the language is built without having to understand complex instructions like those in C, C++, and other low-level languages.

To learn more about PyScript, you can see on PyScript documentation or PyScript repository for full source code.

Try PyScript ▶️

Try PyScript Shell (REPL) inside your browser directly (no installation required).

Installation ⬇️

First, you'll need to download Python. Make sure you're using the latest version above 3.10, to ensure the code runs correctly. Visit the official Python website to download it.

Next, after downloading and configuring the Python application, you can download the PyScript from PyScript releases or from PIP with this command (Recommended):

pip install -U pyscript-programming-language

[OPTIONAL] You can download additional libraries that PyScript requires with this command:

pip install -U pyscript-programming-language[other]

And also, you can download PyScript with git:

git clone https://github.com/azzammuhyala/pyscript
cd pyscript
pip install .

After that, you can run the PyScript shell (REPL) with this command:

python -m pyscript

If successful, you can see the version, release date, and a >>> like Python shell (REPL).

Example 📜

Familiar? There it is!

# get a number and operator with input()
a = float(input("Enter a first number : "))
b = float(input("Enter a second number: "))
operation = input("Enter an operation (+, -, *, /): ")

# define a functions
func add(a, b) {
return a + b
}

func sub(a, b) {
return a - b
}

func mul(a, b) {
return a * b
}

func floordiv(a, b) {
# check b is zero
return b != 0 ? a / b : none
}

# operation matching
switch (operation.strip())
{
case '+':
result = add(a, b)
print("Result of {:,} + {:,} = {:,}".format(a, b, result))
break

case '-':
result = sub(a, b)
print("Result of {:,} - {:,} = {:,}".format(a, b, result))
break

case '*':
result = mul(a, b)
print("Result of {:,} * {:,} = {:,}".format(a, b, result))
break

case '/':
result = floordiv(a, b)
print("Result of {:,} / {:,} = {}".format(
a, b,
result is not none ? format(result, ',') : "Cannot be divided by 0")
)
break

default:
print("Unknown operation")
}

Library Requirements 📓

No Name Status
1 argparse required
2 builtins required
3 cmath required
4 collections.abc required
5 difflib required
6 functools required
7 html required
8 importlib required
9 inspect required
10 io required
11 itertools required
12 json required
13 operator required
14 os required
15 pkgutil required
16 re required
17 site required
18 subprocess required
19 sys required
20 types required
21 typing required
22 unicodedata required
1 ast required (library)
2 math required (library)
3 msvcrt required (library)
4 pprint required (library)
5 shutil required (library)
6 signal required (library)
7 stat required (library)
8 termios required (library)
9 time required (library)
10 tty required (library)
1 _colorize optional
2 beartype optional
3 ctypes optional
4 numpy optional
5 prompt_toolkit optional
6 pygments optional
7 readline optional
8 threading optional
9 tkinter optional
10 IPython optional

Status Explanation

  • required: Required by PyScript entirely.
  • required (library): Required by PyScript optional library. PyScript is not affected, unless you import it.
  • optional: Not required, but if it is present, some features can be used without issue.

Highlights 🎨

Behind It 🕰️

This language created from based up on a YouTube tutorial (check more on GitHub here by @davidcallanan). At least, it takes about 6 months to learn it, and also need to learn general things that exist in other programming languages.

Metadata

Release files for pyscript-programming-language 1.15.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyscript-programming-language 1.15.2
File Size Uploaded Provenance Actions
pyscript_programming_language-1.15.2.tar.gz 112.3 kB Without provenance Details for pyscript_programming_language-1.15.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyscript-programming-language 1.15.2
File Interpreter ABI Platform Actions
pyscript_programming_language-1.15.2-py3-none-any.whl Python 3 none any Details for pyscript_programming_language-1.15.2-py3-none-any.whl

Total release size: 236.8 kB

Release files / pyscript_programming_language-1.15.2.tar.gz

Download URL pyscript_programming_language-1.15.2.tar.gz
Size 112.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a755a30da7bbffa8356ee348eaa721bb45b6bd348fdb0761a2eb3d1b7be91b1b
BLAKE2b-256 checksum
How to use checksums
79eb9aeada44ff7ffb8f3c48409196c894c6266bc0d40c3acbead022becc79b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / pyscript_programming_language-1.15.2-py3-none-any.whl

Download URL pyscript_programming_language-1.15.2-py3-none-any.whl
Size 124.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1eb5bee09d7f56056838ee3dae6d5012094dc7bb17da343faf9471fa346a854c
BLAKE2b-256 checksum
How to use checksums
6f55f8c74c68933fac717033e8a68831734b4dc4016045b00be3fbdeb4d12508
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for pyscript-programming-language 1.15.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.15.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page