Pyret is a programming language designed for computing education across many contexts, with a robust web-based runtime and programming environment to support broad access. Several curricula have been co-designed with Pyret at many levels.
This editor shows some sample programs from various curricula that you can try out directly on this page! For using Pyret with your students or on your own, check out Ways to Run Pyret.
Pyret has a Visual Studio Code extension that opens files in the same visual editor as the examples above. It works in Github Codespaces, github.dev, and desktop Visual Studio Code.
All the examples above embed an instace of Pyret through its embedding library.
You can embed Pyret on your own websites and projects by
installing that npm
package, which has an API for controlling and
listening to the embedded instance.
You can embed from our copies of the compiler and runtime, or serve
your own. No Pyret code runs on the server: it's strictly a bundle
of client-side HTML, CSS, and JavaScript (we've done a
little bit of engineering in this space to make this possible).
Pyret runs from the command line via the pyret-npm
package.
Nearly all libraries (including images) run the same offline and
in-browser. This can be especially important for grading student
code submissions in an automated way. THIS DOCUMENT (fill) says more
about it.
Pyret has specific libraries and features (FILL: url-file tutorial, Github example) for creating and deploying starter code for students seamlessly. We developed these features and workflows in our own courses, with our own TAs, and for our own curricula.