Packages
Official modules for device features. Each one is a separate pip package with full docs: install steps, permissions, every function, result types and working examples.
Setup is the same for every package
- Install it:
pip install pyxpo-<name>. - List it in
modulesinpyproject.toml. - Run
pyxpo runagain so the native part is built in.
pyproject.toml
[tool.pyxpo]
modules = ["image-picker", "file-system", "sharing"]Files and data
Storage
pyxpo-storageFast key-value storage for settings and small app data, with hooks that re-render on change.Secure Storepyxpo-secure-storeKeep tokens and secrets encrypted in the iOS Keychain and Android Keystore, with optional biometrics.File Systempyxpo-file-systemRead, write, copy and download files in the app's document and cache folders.SQLitepyxpo-sqliteReal SQLite databases with expo-sqlite's API: dict rows, transactions, prepared statements and a provider.Photos and media
Image Picker
pyxpo-image-pickerPick photos and videos from the library, or take new ones with the camera.Image Manipulatorpyxpo-image-manipulatorResize, crop, rotate, flip, compress and convert images on the device.Media Librarypyxpo-media-librarySave photos and videos to the device gallery, with permission helpers.Camerapyxpo-cameraA CameraView component for photos, videos and live barcode and QR scanning.Audiopyxpo-audioPlay sounds from files and URLs with play, pause, seek, loop and volume, and a hook for components.Drawing and 3D
Drawing canvas
pyxpo-drawing-canvasA finger and pen drawing view with undo, redo, clear and PNG or JPEG export.Whiteboardpyxpo-whiteboardA full whiteboard: pen, marker, eraser, fill, nine shapes, page patterns, undo, a ready toolbar and export.Mesh Viewpyxpo-mesh-viewPlay a picture bent by a triangle mesh frame by frame on the GPU, and export it to MP4 or GIF.Sharing
Device and app
Application
pyxpo-applicationThe installed app's name, id, version, build number, install time and signing details.Devicepyxpo-deviceBrand, model, OS, memory, phone or tablet, uptime and Android system features.Hapticspyxpo-hapticsTaps, success and error buzzes, selection ticks and the Android system haptics.Localizationpyxpo-localizationThe user's languages, region, currency, number separators, time zone and clock style.Networkpyxpo-networkConnection type, online or offline, internet reachability, IP address and live changes.Location
Network and web
App config
Notifications
Ads
Calling async functions
Most module functions are coroutines. Write your event handler with async def and pass it to onPress. pyxpo runs it on the app's event loop.
python
from pyxpo import Button
from pyxpo_sharing import Share
async def share_link():
await Share.share({"url": "https://example.com", "message": "Try this"})
Button(title="Share", onPress=share_link)