Skip to main content

Documentation Index

Fetch the complete documentation index at: https://edgepython.com/llms.txt

Use this file to discover all available pages before exploring further.

Run it

Edge Python ships as a WebAssembly module. The fastest way to try it is the playground β€” no install, runs entirely client-side via WebAssembly. Open the playground ->

Embed it

To run Edge Python in your own host (browser app, server, edge runtime), you need two artifacts:
  1. The compiler module: compiler_lib.wasm (~130 KB).
  2. A loader for your platform β€” the canonical browser loader is demo/edge.js; WASI hosts wire it up via their runtime’s import API.
Build the WASM yourself:
git clone https://github.com/dylan-sutton-chavez/edge-python
cd edge-python/compiler
cargo wasm
# β†’ target/wasm32-unknown-unknown/release/compiler_lib.wasm
There is no separate native CLI binary. The host runtime owns I/O, network, and module fetching β€” that’s what keeps Edge Python sandboxed by construction.

Your first program

Open the playground and paste:
greet = lambda name: f"Hello, {name}!"

for who in ["world", "edge", "python"]:
    print(greet(who))
Output
Hello, world!
Hello, edge!
Hello, python!

A taste of the language

Edge Python is a functional subset of Python 3.13. Functions are first-class values. Lambdas, currying, higher-order functions, and comprehensions are central.
# First-class functions
ops = [abs, len, str]
print([f(-3) for f in ops])

# Currying
add = lambda x: lambda y: x + y
print(add(3)(4))

# Pure functions get memoized automatically
def fib(n):
    if n < 2: return n
    return fib(n - 1) + fib(n - 2)

print(fib(20))
Output
[3, 2, '-3']
7
6765

What’s next

What it is

Scope, paradigm, and what intentionally isn’t supported.

Syntax

Operators, literals, and the language surface.

Built-ins

Every built-in function with examples and outputs.

Methods

String, list, and dict methods.