JPS is a Python-like language that compiles to clean, readable JavaScript. Seamlessly integrates with React, Vue, Svelte, and any frontend framework.
def fibonacci(n): if n <= 1: return n return fibonacci(n - 1) + fibonacci(n - 2) class Calculator: def __init__(self): self.history = [] def add(self, a, b): result = a + b self.history.append(result) return result print(fibonacci(10))
function fibonacci(n) { if (n <= 1) { return n; } return fibonacci(n - 1) + fibonacci(n - 2); } class Calculator { constructor() { this.history = []; } add(a, b) { const result = a + b; this.history.push(result); return result; } } console.log(fibonacci(10));
Features
A complete toolset for writing Python-like code that runs anywhere JavaScript runs.
Write code using familiar Python syntax - functions, classes, list comprehensions, and more. No learning curve for Python developers.
Import .jps files directly like .tsx files! Works with Vite, Webpack, and other bundlers with zero configuration.
Instant feedback during development. Changes to your JPS files are reflected immediately without page reload.
Output as ESM, CommonJS, IIFE, or UMD. Perfect for modern apps, Node.js, browsers, or universal libraries.
First-class plugins for Vite, Webpack, Rollup, and esbuild. Seamless integration with your existing workflow.
Works directly in the browser without any build step. Load from CDN and start coding immediately.
Syntax
If you know Python, you already know JPS. Clean, readable syntax that compiles to clean JavaScript.
# Dynamic typing x = 10 name = "JPS" is_valid = true items = [1, 2, 3] data = {"key": "value"}
def greet(name, greeting="Hello"): return greeting + ", " + name # Lambda expressions square = lambda x: x * x print(greet("World"))
class Animal: def __init__(self, name): self.name = name class Dog(Animal): def bark(self): print("Woof!") dog = Dog("Rex")
if x > 5: print("Big") else: print("Small") for i in range(5): print(i) while count > 0: count = count - 1
# lib.jps export def helper(): return "Help!" # main.jps from lib import helper result = helper()
print("Hello!") len([1, 2, 3]) # 3 range(0, 10, 2) # [0,2,4,6,8] sum([1, 2, 3]) # 6 map(lambda x: x*2, [1,2])
Standard Library
Python-like built-in functions available out of the box.
Playground
Write JPS code and see it compile to JavaScript in real-time.
Integrations
Seamless integration with all major frameworks and build tools.
API Reference
A clean API for programmatic compilation.
compile(source, options?): CompileResult
Compiles JPS source code to JavaScript with full metadata and options.
import { compile } from 'jpsx'; const result = compile(` def add(a, b): return a + b `, { format: 'esm', runtimeMode: 'inline' }); console.log(result.code);
compileToJS(source, options?): string
Simplified API that returns only the JavaScript code string.
import { compileToJS } from 'jpsx'; const jsCode = compileToJS('print("Hello!")'); console.log(jsCode);
getRuntime(): string
Returns the JPS runtime library code. Useful for custom bundling or extending the runtime.
import { getRuntime } from 'jpsx'; const runtime = getRuntime(); // Includes: print, range, sum, len, map, filter, etc.
Get Started
Choose the installation method that works best for your project.