Python backend
Routes, bridge handlers, an event system and SQLite storage — your whole app logic in Python.
Write your UI in HTML/CSS/JS and your logic in Python. ENPAF wires them together with a two-way bridge and packages everything into a real, installable APK — no Java, no WSL, no Docker required.
$ pip install enpaf
One project, one language for logic, the web for UI, and a single command to a signed APK.
Routes, bridge handlers, an event system and SQLite storage — your whole app logic in Python.
Plain HTML/CSS/JS. No bundler, no build step — files are served as-is and load instantly.
Call Python from JS with await enpaf.call(), and push events back from Python with app.emit().
Wi-Fi, Bluetooth, sensors, NFC, location, camera, audio, battery, notifications, biometrics & permissions.
paf build apk produces a signed, installable APK on Windows, macOS or Linux via Gradle + Chaquopy.
paf run previews the exact same app in your browser with hot-reload — iterate without a device.
Register a handler in Python, call it from the web UI. That's the whole model.
from enpaf import EnpafApp app = EnpafApp(__name__) @app.route("/") def index(): return app.render("index.html", title=app.name) @app.bridge_handler("hello") def hello(params): name = params.get("name", "World") app.api.vibrate(200) return {"message": f"Hi, {name}!"} if __name__ == "__main__": app.run()
// Call Python from the web UI const res = await enpaf.call("hello", { name: "Alex" }); enpaf.device.toast(res.message); // "Hi, Alex!" // Listen for events pushed from Python enpaf.on("progress", (d) => updateBar(d.percent)); // Storage, sensors, permissions — all from JS await enpaf.storage.set("theme", "dark"); const acc = await enpaf.sensors.read("accelerometer"); await enpaf.permissions.request(["CAMERA"]);
Python handlers + a web UI.
paf run in your browser.
paf build apk → signed APK.
paf CLI
paf create <name>Scaffold a new projectpaf runDev server + hot-reloadpaf servePush a build to a device over Wi-Fipaf build apkBuild an installable APKpaf doctorCheck your build environmentpaf infoShow the project configpaf updateUpdate PAF to the latest versionFull reference in the CLI docs →
Every capability is a module on app and a helper on enpaf.
Scan a QR from paf serve and the Companion downloads & installs your APK over Wi-Fi — no cable.
$ pip install enpaf $ paf create myapp $ cd myapp $ paf run # preview at http://127.0.0.1:8080 $ paf build apk # → dist/myapp-1.0.0.apk
Building APKs needs JDK 17–21 + the Android SDK. Run paf doctor to check. See the installation guide →
A detailed wiki covers everything from your first project to release signing.
Framework + the build toolchain.
→Your first app in 5 minutes.
→EnpafApp, routes, handlers, events.
The full enpaf.* client SDK.
Sensors, NFC, Wi-Fi, BT & more.
→Gradle + Chaquopy, signing, release.
→How dev mode & Android mode work.
→Crashes, builds, OneDrive, JDK.
→Install the framework and create your first project right now.
$ pip install enpaf