introduction

Welcome to pyxpo

pyxpo is an open-source framework for building native iOS, Android, Mac and Windows apps, and web apps, in Python. If you know React Native or Expo, you already know how it works.

Create your first app
$pip install pyxpo

You write screens as Python functions that return components. State lives in hooks. Files in the app/ folder become routes. pyxpo runs your code in a real CPython 3.13.7 interpreter inside the app and draws real UIKit and Android views. There is no web view. The same code also runs as a native desktop app and, through Pyodide, in the browser.

app/index.py
from pyxpo import Text, View

def Index():
    return View(Text("Hello from Python"), style={"padding": 24})

default = Index

What you get

  • Components and APIs with React Native names: View, Text, FlatList, Alert, Platform, Linking and many more.
  • Hooks: useState, useEffect, useReducer, useContext and the rest, plus use_async for async work.
  • Themes and responsive layout: light and dark themes in StyleSheet.create, breakpoints in any style, and Container, Row, Col and Grid layouts.
  • A file-based router with Stack, Tabs and Drawer layouts, dynamic routes and deep links.
  • Native modules as pip packages, for photos, files, secure storage, sharing and more.
  • App config in pyproject.toml and config plugins in Python, so you rarely need to touch native files.
  • One CLI to create, run with hot reload, build, and prebuild native projects, for iOS, Android, desktop and web.

pyxpo 0.1.0a5 is an alpha release. The API follows Expo and React Native closely, but some details may change before 1.0. Please report problems on GitHub.

Where to go next