This release is a pre-release and may not be stable for production use.
pyxpo-haptics
Haptic (touch) feedback for pyxpo apps. The API follows expo-haptics.
This is an optional pyxpo native module. Apps that do not list it carry none of its code, permissions or dependencies.
Install
pip install pyxpo-haptics
Then link it into your app in pyproject.toml:
[tool.pyxpo]
modules = ["haptics"]
and rebuild (pyxpo run ios, pyxpo build android, ...).
Use
import pyxpo_haptics as Haptics
await Haptics.impact_async(Haptics.ImpactFeedbackStyle.Heavy) # or Haptics.impactAsync
await Haptics.notification_async(Haptics.NotificationFeedbackType.Error)
await Haptics.selection_async()
await Haptics.perform_android_haptics_async(Haptics.AndroidHaptics.Confirm) # Android only
impact_async(style):Light,Medium(default),Heavy,Rigid,Soft.notification_async(type):Success(default),Warning,Error.selection_async(): a selection change, for example a picker moving to the next value.perform_android_haptics_async(type): a system haptic constant (AndroidHaptics.Confirm,Reject,Long_Press,Clock_Tick, ...). It follows the user's touch-feedback setting and does nothing on iOS. Types newer than the device's Android version fall back to a close older one.
Enum members and their string values ("heavy", "error", ...) are both accepted.
- iOS uses the UIKit feedback generators. The Simulator has no Taptic Engine, so nothing is felt there.
- Android plays short vibration patterns and needs the
VIBRATEpermission, which this module adds. The patterns are pyxpo's own and are not tuned to match Expo's. - On the desktop every call does nothing.
What is in the package
pyxpo_haptics/__init__.py: the Python API.pyxpo_haptics/pyxpo-module.json: autolink metadata.pyxpo_haptics/ios/: Swift sources compiled into the iOS app.pyxpo_haptics/android/src/main/: Kotlin sources and the manifest merged into the Android app.
Metadata
Release files for pyxpo-haptics 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyxpo_haptics-0.1.0a1.tar.gz | 8.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyxpo_haptics-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.1 kB
Release files / pyxpo_haptics-0.1.0a1.tar.gz
| Download URL | pyxpo_haptics-0.1.0a1.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8310e56b52fac6814196883d317433bc847988ac054e36cd2515840898805c6
|
|
BLAKE2b-256 checksum How to use checksums |
99aad350605cde00a5d6512d63551cec14b40c61318b8f0657e4cfbe6166fe6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / pyxpo_haptics-0.1.0a1-py3-none-any.whl
| Download URL | pyxpo_haptics-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db3de2a48a88d707771bc6e93a4788dac982e2077d476bd80990c9a226964a82
|
|
BLAKE2b-256 checksum How to use checksums |
06a192216af8b58cd8a73999b0bf78c790a6142541c29485587d52c331642144
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency log