Skip to content
aaalllexxx edited this page Jun 29, 2026 · 1 revision

ENPAF

ENPAFEngine for Native Python App Framework — lets you build real Android APK applications with Python + HTML/CSS/JS. You write your UI as a web app and your logic in Python; ENPAF wires the two together with a bidirectional bridge and packages everything into a native APK using Chaquopy.

  • 🐍 Python backend — routes, bridge handlers, events, SQLite storage.
  • 🌐 Web frontend — plain HTML/CSS/JS, no build step required.
  • 🔌 Two-way bridge — call Python from JS (await enpaf.call(...)) and push events from Python to JS (app.emit(...)).
  • 📱 Device capabilities — Wi-Fi, Bluetooth, sensors, NFC, location, camera, audio, battery, notifications, biometrics, permissions.
  • 🛠 One-command buildspaf build apk produces a signed APK on Windows (no WSL, no Docker).
  • 🧪 Dev serverpaf run runs the exact same app in your browser with live reload, so you iterate without a device.
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):
    return {"message": f"Hello, {params.get('name', 'World')}!"}

if __name__ == "__main__":
    app.run()
// In your web UI:
const res = await enpaf.call("hello", { name: "Alex" });
console.log(res.message); // "Hello, Alex!"

Where to go next

I want to… Page
Install ENPAF and the build toolchain Installation
Build my first app in 5 minutes Quick Start
Understand the project layout Project Structure
Look up a paf command CLI Reference
Configure enpaf.json enpaf.json Configuration
Use the Python API Python API
Use the JS enpaf.* API JavaScript Bridge
Access device hardware Device Capabilities
Build & sign a release APK Building APKs · Release & Signing
Understand how it all works Architecture
Run tests / set up CI Testing & CI
Fix a crash or build error Troubleshooting

Two parts of this repo

ENPAF ships as one repository with two kinds of deliverable:

  1. The framework — the enpaf Python package + the paf CLI. Published as a wheel/sdist on the Releases page.
  2. Example appstestapp (a feature demo) and companion (an Expo-Go-style debugger/loader). Their release-signed APKs are also attached to Releases.

Requirements at a glance

  • Python ≥ 3.9 to run the framework and dev server.
  • JDK 17–21 and the Android SDK to build APKs (see Installation).
  • Windows, macOS, or Linux. The build pipeline is tuned to work natively on Windows, including inside OneDrive folders.

License

ENPAF is released under the PolyForm Noncommercial License 1.0.0: free for noncommercial use, with commercial use requiring a paid license. See License.

Clone this wiki locally