packages

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

  1. Install it: pip install pyxpo-<name>.
  2. List it in modules in pyproject.toml.
  3. Run pyxpo run again so the native part is built in.
pyproject.toml
[tool.pyxpo]
modules = ["image-picker", "file-system", "sharing"]

Files and data

Photos and media

Drawing and 3D

Sharing

Device and app

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)