encyclopegia.org

PyScript

PyScript is a framework for running Python scripts in a web browser. PyScript was presented to the public by Peter Wang at a Python developer conference in June 2022. PyScript is primarily developed by Anaconda, Inc.

PyScript is a framework for running Python scripts in a web browser. PyScript was presented to the public by Peter Wang at a Python developer conference in June 2022. PyScript is primarily developed by Anaconda, Inc. PyScript: What time is it? What time is it? from pyscript import when, display from datetime import datetime @when("click", "#btnTime") def click_handler(event): now = datetime.now() display( now.strftime( "Today is %m/%d/%Y. " + "The current time is %I:%M:%S %p." ) ) As an alternative to , the element can also be used (as in the example below). However, the new notation is recommended. PyScript also offers the possibility to communicate with the user via a command prompt. For this, the terminal attribute must be added to the or element. If input should also be possible, the worker attribute must be specified as well. In earlier versions, a terminal could also be implemented using the element. PyScript: Bar chart packages = ["matplotlib"] import matplotlib.pyplot as plt from pyscript import display fig, ax = plt.subplots() x = ["Apples", "Pears", "Bananas", "Pineapples"] y = [3, 7, 8, 10] plt.bar(x, y) plt.xlabel('Fruits') plt.ylabel('Popularity') plt.title('Fruits and their popularity') fig display(fig, target="mpl") In order to create such diagrams, the matplotlib extension must be loaded in a block.

References

No reference rows published for this article.

Cite this article

MLA

"PyScript." encyclopegia.org, 2026, https://encyclopegia.org/wiki/pyscript. Accessed 24 November 2026.

Chicago

"PyScript." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/pyscript.

APA

encyclopegia.org. (2026). PyScript. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/pyscript

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1371681643 · 0.5 · snapshot enwiki-001371681643

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.