pythonnative.create_page(...) — called internally by native templates to bootstrap the root component. You don't call this directly.
pythonnative.Text,Button,Column,Row,ScrollView,TextInput,Image,Switch,ProgressBar,ActivityIndicator,WebView,Spacerpythonnative.View,SafeAreaView,Modal,Slider,Pressable,FlatList
Each returns an Element descriptor. Visual and layout properties are passed via style={...}. See the Component Property Reference for full details.
pythonnative.Element — the descriptor type returned by element functions. You generally don't create these directly.
Function component primitives:
pythonnative.component— decorator to create a function componentpythonnative.use_state(initial)— local component statepythonnative.use_effect(effect, deps)— side effectspythonnative.use_navigation()— navigation handle (push/pop/get_args)pythonnative.use_memo(factory, deps)— memoised valuespythonnative.use_callback(fn, deps)— stable function referencespythonnative.use_ref(initial)— mutable ref objectpythonnative.use_context(context)— read from contextpythonnative.create_context(default)— create a new contextpythonnative.Provider(context, value, child)— provide a context value
pythonnative.StyleSheet— utility for creating and composing style dictspythonnative.ThemeContext— built-in theme context (defaults to light theme)
pythonnative.native_modules.Camera— photo capture and gallery pickingpythonnative.native_modules.Location— GPS / location servicespythonnative.native_modules.FileSystem— app-scoped file I/Opythonnative.native_modules.Notifications— local push notifications
pythonnative.utils.IS_ANDROID— platform flag with robust detection for Chaquopy/Android.pythonnative.utils.get_android_context()— returns the current AndroidActivity/Contextwhen running on Android.pythonnative.utils.set_android_context(ctx)— set internally during page bootstrapping; you generally don't call this directly.pythonnative.utils.get_android_fragment_container()— returns the current Fragment containerViewGroupused for page rendering.
pythonnative.reconciler.Reconciler — diffs element trees and applies minimal native mutations. Supports key-based child reconciliation, function components, and context providers. Used internally by create_page.
pythonnative.hot_reload.FileWatcher — watches a directory for file changes and triggers a callback. Used by pn run --hot-reload.
pythonnative.hot_reload.ModuleReloader — reloads changed Python modules on the device and triggers page re-rendering.
pythonnative.native_views.NativeViewRegistry — maps element type names to platform-specific handlers. Use set_registry() to inject a mock for testing.