This release is a pre-release and may not be stable for production use.
React Native Debugger Client
A Python client for interacting with React Native applications via the Hermes debugger.
Features
- Connect to a React Native app's Hermes debugger
- Execute JavaScript code in the React Native context
- Interact with UI elements (tap, scroll, enter text)
- Get the React component tree
- Navigate between screens
- Debug utilities (toggle debug features, performance overlay)
- Widget finder utilities
Installation
pip install react-native-debugger-client
Usage
Basic Usage
from react_native_debugger_client import ReactNativeDebuggerClient
# Connect to a React Native app running on your device or emulator
client = ReactNativeDebuggerClient(device_ip="localhost", metro_port=8081)
success, message = client.connect()
if success:
# Get the UI tree
ui_tree = client.get_ui_tree()
# Tap a button
client.tap_element(test_id="submit_button")
# Enter text in an input field
client.enter_text(test_id="email_input", text="user@example.com")
# Scroll down
client.scroll("down")
# Navigate to a screen
client.navigate_to_screen("HomeScreen")
# Execute custom JavaScript
client.execute_js("console.log('Hello from Python!');")
# Close the connection when done
client.close()
Context Manager
You can also use the client as a context manager:
with ReactNativeDebuggerClient() as client:
success, message = client.connect()
if success:
client.tap_element(text="Login")
API Reference
Connection
__init__(device_ip="localhost", metro_port=8081)- Initialize the clientconnect(timeout=10)- Connect to the React Native app's Hermes debuggerclose()- Close the connection
UI Interaction
tap_element(test_id=None, text=None, timeout=5)- Tap an element by test ID or text contententer_text(test_id, text, timeout=5)- Enter text into a TextInput elementscroll(direction="down", distance=300, timeout=5)- Scroll the screenscroll_element(test_id=None, direction="down", distance=300, timeout=5)- Scroll a specific element
Navigation
get_current_screen(timeout=5)- Get the name of the current screennavigate_to_screen(screen_name, params=None, timeout=5)- Navigate to a specific screen
Widget Utilities
find_widgets(search_by="all", search_value="", timeout=5)- Find widgets matching criteriatap_widget_by_key(key_value, timeout=5)- Tap a widget by its keytap_widget_by_text(text, timeout=5)- Tap a widget by its text contenttap_widget_by_type(widget_type, timeout=5)- Tap a widget by its typetap_widget_by_tooltip(tooltip_text, timeout=5)- Tap a widget by its tooltip textenter_text_by_key(key_value, text, timeout=5)- Enter text in a widget by its keyenter_text_by_type(widget_type, text, timeout=5)- Enter text in a widget by its typeenter_text_by_text(widget_text, text, timeout=5)- Enter text in a widget by its text content
Debug Utilities
toggle_debug_paint_feature(enable=True, timeout=5)- Toggle debug paint featuretoggle_performance_overlay(enable=True, timeout=5)- Toggle performance overlaytoggle_repaint_rainbow(enable=True, timeout=5)- Toggle repaint rainbowtoggle_debug_banner(enable=True, timeout=5)- Toggle debug banner
Requirements
- Python 3.7+
- requests>=2.28.0
- websocket-client>=1.3.0
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for react-native-debugger-client 0.0.1.dev1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| react_native_debugger_client-0.0.1.dev1.tar.gz | 17.8 kB | Without provenance | Details for react_native_debugger_client-0.0.1.dev1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| react_native_debugger_client-0.0.1.dev1-py3-none-any.whl | Python 3 | none | any | Details for react_native_debugger_client-0.0.1.dev1-py3-none-any.whl |
Total release size: 36.9 kB
Release files / react_native_debugger_client-0.0.1.dev1.tar.gz
| Download URL | react_native_debugger_client-0.0.1.dev1.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49253700b8866a0b648e846f12020ea629c394bc7ed5b8f88e92a694335c1e13
|
|
BLAKE2b-256 checksum How to use checksums |
fc41d24242aa5ad76022fe46a743f9dc781fbb9784908fa3b7234969b6a33857
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / react_native_debugger_client-0.0.1.dev1-py3-none-any.whl
| Download URL | react_native_debugger_client-0.0.1.dev1-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02f4f06fc8c2ca62196982ee944920b1ddaa99e3437409252b5daadf2ec65c16
|
|
BLAKE2b-256 checksum How to use checksums |
13ad5a5f4b74fbf6bfa164db3c3333fe070c78db5e4409619b7808cdbcdbd2cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for react-native-debugger-client 0.0.1.dev1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.