packages

Native modules for pyxpo

Each device feature is its own pip package, with full reference docs. Install what you need, list it in modules, and nothing else gets compiled into your app.

  • 24 official packages
  • 21 with Swift and Kotlin code
  • Expo-shaped APIs
  • MIT licensed
1

Install

$pip install pyxpo-image-picker
2

List it

pyproject.toml
[tool.pyxpo]
modules = ["image-picker"]
3

Use it

python
res = await ImagePicker.launchImageLibraryAsync()

Files and data

Storage

pyxpo-storage
pure Python

Fast key-value storage for settings and small app data, with hooks that re-render on change.

$pip install pyxpo-storage
modules
"storage"
Import
from pyxpo_storage import storage, use_storage_string
Main APIs
storage.setstorage.get_stringuse_storage_stringStorage(id=...)
Like
react-native-mmkv and AsyncStorage
iOSAndroidDesktop

Secure Store

pyxpo-secure-store
native

Keep tokens and secrets encrypted in the iOS Keychain and Android Keystore, with optional biometrics.

$pip install pyxpo-secure-store
modules
"secure-store"
Import
import pyxpo_secure_store as SecureStore
Main APIs
SecureStore.set_item_asyncSecureStore.get_item_asyncSecureStore.delete_item_async
Like
expo-secure-store
iOSAndroidDesktop

File System

pyxpo-file-system
native

Read, write, copy and download files in the app's document and cache folders.

$pip install pyxpo-file-system
modules
"file-system"
Import
from pyxpo_file_system import File, Directory, Paths
Main APIs
File(...).writeFile(...).text_syncDirectory.listFile.download_file_async
Like
expo-file-system
iOSAndroidDesktop

SQLite

pyxpo-sqlite
pure Python

Real SQLite databases with expo-sqlite's API: dict rows, transactions, prepared statements and a provider.

$pip install pyxpo-sqlite
modules
"sqlite"
Import
import pyxpo_sqlite as SQLite
Main APIs
open_database_asyncrun_asyncget_all_asyncwith_transaction_asyncSQLiteProvider
Like
expo-sqlite
iOSAndroidDesktop

Photos and media

Image Picker

pyxpo-image-picker
native

Pick photos and videos from the library, or take new ones with the camera.

$pip install pyxpo-image-picker
modules
"image-picker"
Import
from pyxpo_image_picker import ImagePicker
Main APIs
ImagePicker.launchImageLibraryAsyncImagePicker.launchCameraAsync
Like
expo-image-picker
iOSAndroidDesktop

Image Manipulator

pyxpo-image-manipulator
native

Resize, crop, rotate, flip, compress and convert images on the device.

$pip install pyxpo-image-manipulator
modules
"image-manipulator"
Import
from pyxpo_image_manipulator import ImageManipulator, SaveFormat, FlipType
Main APIs
ImageManipulator.manipulateAsyncImageManipulator.compressToSizeAsyncImageManipulator.getInfoAsync
Like
expo-image-manipulator
iOSAndroidDesktop

Media Library

pyxpo-media-library
native

Save photos and videos to the device gallery, with permission helpers.

$pip install pyxpo-media-library
modules
"media-library"
Import
from pyxpo_media_library import MediaLibrary
Main APIs
MediaLibrary.saveToLibraryAsyncMediaLibrary.createAssetAsyncMediaLibrary.requestPermissionsAsync
Like
expo-media-library
iOSAndroidDesktop

Camera

pyxpo-camera
native

A CameraView component for photos, videos and live barcode and QR scanning.

$pip install pyxpo-camera
modules
"camera"
Import
import pyxpo_camera as Camera
Main APIs
CameraViewtake_picture_asyncrecord_asyncuse_camera_permissionsscan_from_url_async
Like
expo-camera
iOSAndroidDesktop

Audio

pyxpo-audio
native

Play sounds from files and URLs with play, pause, seek, loop and volume, and a hook for components.

$pip install pyxpo-audio
modules
"audio"
Import
import pyxpo_audio as Audio
Main APIs
use_audio_playercreate_audio_playerAudioPlayer
Like
expo-audio
iOSAndroidDesktop

Drawing and 3D

Drawing canvas

pyxpo-drawing-canvas
native

A finger and pen drawing view with undo, redo, clear and PNG or JPEG export.

$pip install pyxpo-drawing-canvas
modules
"drawing-canvas"
Import
import pyxpo_drawing_canvas as DrawingCanvas
Main APIs
DrawingCanvasundoredoclearget_strokes_asyncset_strokes_asyncto_image_async
Like
react-native-skia and signature-canvas style drawing views
iOSAndroidDesktop

Whiteboard

pyxpo-whiteboard
native

A full whiteboard: pen, marker, eraser, fill, nine shapes, page patterns, undo, a ready toolbar and export.

$pip install pyxpo-whiteboard
modules
"whiteboard"
Import
import pyxpo_whiteboard as WB
Main APIs
Whiteboarduse_whiteboardWhiteboardToolbarto_image_asyncset_elements_async
Like
none (pyxpo only)
iOSAndroidDesktop

Mesh View

pyxpo-mesh-view
native

Play a picture bent by a triangle mesh frame by frame on the GPU, and export it to MP4 or GIF.

$pip install pyxpo-mesh-view
modules
"mesh-view"
Import
import pyxpo_mesh_view as MeshView
Main APIs
MeshViewwrite_meshread_headerexport_asyncexport_plan
Like
none (pyxpo only)
iOSAndroidDesktop

Sharing

Sharing

pyxpo-sharing
native

Open the native share sheet for files, images, links and text.

$pip install pyxpo-sharing
modules
"sharing"
Import
from pyxpo_sharing import Share, Sharing
Main APIs
Share.shareSharing.shareAsyncSharing.isAvailableAsync
Like
expo-sharing and React Native Share
iOSAndroidDesktop

Device and app

Application

pyxpo-application
native

The installed app's name, id, version, build number, install time and signing details.

$pip install pyxpo-application
modules
"application"
Import
import pyxpo_application as Application
Main APIs
application_namenative_application_versionget_installation_time_asyncget_android_idget_ios_application_release_type_async
Like
expo-application
iOSAndroidDesktop

Device

pyxpo-device
native

Brand, model, OS, memory, phone or tablet, uptime and Android system features.

$pip install pyxpo-device
modules
"device"
Import
import pyxpo_device as Device
Main APIs
model_nameos_versiondevice_typetotal_memoryget_uptime_asynchas_platform_feature_async
Like
expo-device
iOSAndroidDesktop

Haptics

pyxpo-haptics
native

Taps, success and error buzzes, selection ticks and the Android system haptics.

$pip install pyxpo-haptics
modules
"haptics"
Import
import pyxpo_haptics as Haptics
Main APIs
impact_asyncnotification_asyncselection_asyncperform_android_haptics_async
Like
expo-haptics
iOSAndroidDesktop

Localization

pyxpo-localization
native

The user's languages, region, currency, number separators, time zone and clock style.

$pip install pyxpo-localization
modules
"localization"
Import
import pyxpo_localization as Localization
Main APIs
get_localesget_calendarsuse_localesuse_calendars
Like
expo-localization
iOSAndroidDesktop

Network

pyxpo-network
native

Connection type, online or offline, internet reachability, IP address and live changes.

$pip install pyxpo-network
modules
"network"
Import
import pyxpo_network as Network
Main APIs
get_network_state_asyncuse_network_stateadd_network_state_listenerget_ip_address_async
Like
expo-network
iOSAndroidDesktop

Location

Location

pyxpo-location
native

Current and live position, compass heading, geocoding both ways and permission hooks.

$pip install pyxpo-location
modules
"location"
Import
import pyxpo_location as Location
Main APIs
request_foreground_permissions_asyncget_current_position_asyncwatch_position_asyncget_heading_asyncreverse_geocode_async
Like
expo-location
iOSAndroidDesktop

Network and web

Fetch

pyxpo-fetch
native

HTTP requests with the web fetch API: streaming bodies, abort, timeouts, redirects and cookies.

$pip install pyxpo-fetch
modules
"fetch"
Import
from pyxpo_fetch import FetchError, fetch
Main APIs
fetchResponseHeadersAbortControllerFetchError
Like
expo/fetch
iOSAndroidDesktop

Web Browser

pyxpo-web-browser
native

In-app browser with a colored toolbar, OAuth sign-in sessions and Custom Tabs warm-up.

$pip install pyxpo-web-browser
modules
"web-browser"
Import
import pyxpo_web_browser as WebBrowser
Main APIs
open_browser_asyncopen_auth_session_asyncdismiss_browserwarm_up_async
Like
expo-web-browser
iOSAndroidDesktop

App config

Dot env

pyxpo-dot-env
pure Python

.env files per build mode, typed getters, and a build that stops when a secret would ship.

$pip install pyxpo-dot-env
modules
"dot-env"
Import
from pyxpo_dot_env import env
Main APIs
envEnvEnvErrorPREFIX
Like
Expo EXPO_PUBLIC_ variables and react-native-config
iOSAndroidDesktop

Notifications

Notifications

pyxpo-notifications
native

Local notifications, schedules, taps, Android channels and remote push through APNs and FCM.

$pip install pyxpo-notifications
modules
"notifications"
Import
import pyxpo_notifications as Notifications
Main APIs
request_permissions_asyncschedule_notification_asyncset_notification_handleradd_notification_response_received_listenerset_notification_channel_asyncget_device_push_token_async
Like
expo-notifications
iOSAndroidDesktop

Ads

Google Mobile Ads

pyxpo-google-mobile-ads
native

AdMob banner, native, interstitial, rewarded and app open ads, with consent and settings for apps for children.

$pip install pyxpo-google-mobile-ads
modules
"google-mobile-ads"
Import
import pyxpo_google_mobile_ads as Ads
Main APIs
BannerAdNativeAdInterstitialAdRewardedAdRewardedInterstitialAdAppOpenAduse_rewarded_adconsentinitialize_async
Like
react-native-google-mobile-ads
iOSAndroidDesktop
works together

Pick, edit, save, share.

Packages pass plain file URIs to each other, so a full photo flow is a few lines of Python.

Package reference
app/index.py
from pyxpo_image_picker import ImagePicker
from pyxpo_image_manipulator import ImageManipulator
from pyxpo_media_library import MediaLibrary
from pyxpo_sharing import Share

async def edit_photo():
    res = await ImagePicker.launchImageLibraryAsync()
    if res["canceled"]:
        return
    out = await ImageManipulator.manipulateAsync(
        res["assets"][0]["uri"], [{"resize": {"width": 1080}}],
    )
    if (await MediaLibrary.requestPermissionsAsync(writeOnly=True))["granted"]:
        await MediaLibrary.saveToLibraryAsync(out["uri"])
    await Share.share({"url": out["uri"]})
make your own

Build a module for everyone.

A module is a pip package with Python code, a small manifest and optional Swift and Kotlin sources. Publish it to PyPI and any pyxpo app can use it.

Read the guide
pyproject.toml
[project.entry-points."pyxpo.modules"]
haptics = "pyxpo_haptics"