| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
PythonNative re-exports a small public surface from pythonnative/__init__.py. Most user code only ever touches the names in this overview; deeper internals (reconciler, native_views, hosts) are documented for contributors and integrators.
Your app module defines a top-level component named App:
import pythonnative as pn
@pn.component
def App():
return pn.NavigationContainer(...)The bundled Android ScreenFragment and iOS ViewController load your app by module path ("app.main") and look up the module's top-level App attribute. There is no registration step or imperative bootstrap call. If you need to expose a differently-named root component, configure the templates to load an explicit dotted path like "app.main.RootScreen" instead.
::: pythonnative options: show_root_heading: false show_root_toc_entry: false members: false
The reference is split per module so each page stays scannable:
| Area | Page | Key symbols |
|---|---|---|
| Component model | Component | [component][pythonnative.component.component], [Component][pythonnative.Component], [memo][pythonnative.memo] |
| Element factories | Components | [Text][pythonnative.Text], [Button][pythonnative.Button], [Column][pythonnative.Column], [Row][pythonnative.Row], [ScrollView][pythonnative.ScrollView], [FlatList][pythonnative.FlatList], [SectionList][pythonnative.SectionList], [Modal][pythonnative.Modal], [Pressable][pythonnative.Pressable], [StatusBar][pythonnative.StatusBar], [KeyboardAvoidingView][pythonnative.KeyboardAvoidingView], [RefreshControl][pythonnative.RefreshControl], [Picker][pythonnative.Picker], [Fragment][pythonnative.Fragment], [Portal][pythonnative.Portal], [ErrorBoundary][pythonnative.ErrorBoundary] |
| Hooks | Hooks | [use_state][pythonnative.use_state], [use_reducer][pythonnative.use_reducer], [use_effect][pythonnative.use_effect], [use_layout_effect][pythonnative.use_layout_effect], [use_memo][pythonnative.use_memo], [use_ref][pythonnative.use_ref], [use_imperative_handle][pythonnative.use_imperative_handle], [use_context][pythonnative.use_context], [use_back_handler][pythonnative.use_back_handler], [use_window_dimensions][pythonnative.use_window_dimensions], [use_safe_area_insets][pythonnative.use_safe_area_insets], [use_keyboard_height][pythonnative.use_keyboard_height], [use_color_scheme][pythonnative.use_color_scheme], [use_resource][pythonnative.use_resource], [use_transition][pythonnative.use_transition], [use_deferred_value][pythonnative.use_deferred_value], [create_context][pythonnative.create_context] |
| Suspense | Suspense | [Suspense][pythonnative.Suspense], [Resource][pythonnative.Resource], [start_resource][pythonnative.start_resource], [lazy][pythonnative.lazy] |
| Animations | Animated | Animated, [AnimatedValue][pythonnative.AnimatedValue], [use_animated_value][pythonnative.use_animated_value] |
| System dialogs | Alerts | [Alert][pythonnative.Alert] |
| Platform | Platform | [Platform][pythonnative.Platform] |
| Navigation | Navigation | [NavigationContainer][pythonnative.NavigationContainer], [create_stack_navigator][pythonnative.create_stack_navigator], [create_tab_navigator][pythonnative.create_tab_navigator], [create_drawer_navigator][pythonnative.create_drawer_navigator], [Navigation][pythonnative.Navigation], [use_navigation][pythonnative.use_navigation], [use_route][pythonnative.use_route], [use_is_focused][pythonnative.use_is_focused], [LinkingConfig][pythonnative.LinkingConfig] |
| Testing | Testing | [render][pythonnative.testing.render], [render_hook][pythonnative.testing.render_hook], [FakeBackend][pythonnative.testing.FakeBackend], [FakeHost][pythonnative.testing.FakeHost] |
| Styling | Style | [StyleSheet][pythonnative.StyleSheet], [Style][pythonnative.style.Style], [StyleProp][pythonnative.style.StyleProp], [style][pythonnative.style.style], [Theme][pythonnative.Theme], [ThemeContext][pythonnative.style.ThemeContext], [use_theme][pythonnative.use_theme] |
| Appearance | Appearance | [use_color_scheme][pythonnative.use_color_scheme], appearance.set_color_scheme, appearance.get_color_scheme |
| Images | Images | Image, ImageBackground |
| Element descriptor | Element | [Element][pythonnative.Element] |
| Screen host | Hosts | [create_screen][pythonnative.create_screen], [ScreenHost][pythonnative.hosts.base.ScreenHost] |
| Reconciler | Reconciler | [Reconciler][pythonnative.reconciler.Reconciler] |
| Native modules | Native modules | Camera, Location, FileSystem, Notifications |
| Native views | Native views | [NativeViewRegistry][pythonnative.native_views.NativeViewRegistry], [ViewHandler][pythonnative.native_views.base.ViewHandler] |
| Mutation ops | Mutation ops | [CreateOp][pythonnative.mutations.CreateOp], [UpdateOp][pythonnative.mutations.UpdateOp], [InsertOp][pythonnative.mutations.InsertOp], [DestroyOp][pythonnative.mutations.DestroyOp], [SetFrameOp][pythonnative.mutations.SetFrameOp] |
| Event routing | Events | [EventRegistry][pythonnative.events.EventRegistry], [dispatch_event][pythonnative.events.dispatch_event], [extract_events][pythonnative.events.extract_events] |
| Platform metrics | Platform metrics | [SafeAreaInsets][pythonnative.platform_metrics.SafeAreaInsets], [WindowDimensions][pythonnative.platform_metrics.WindowDimensions], [subscribe][pythonnative.platform_metrics.subscribe] |
| Dev server | Dev server | [DevServer][pythonnative.devserver.DevServer], [DevClient][pythonnative.devclient.DevClient], [WebTransport][pythonnative.bridge.web.WebTransport] |
| Hot reload | Hot reload | [apply_reload][pythonnative.hot_reload.apply_reload], [ModuleReloader][pythonnative.hot_reload.ModuleReloader] |
| Diagnostics | Diagnostics | [HookOrderError][pythonnative.HookOrderError], [warn][pythonnative.diagnostics.warn], [is_dev][pythonnative.diagnostics.is_dev], [report_error][pythonnative.diagnostics.report_error] |
| Custom components SDK | SDK | [Props][pythonnative.sdk._components.Props], [ViewHandler][pythonnative.native_views.base.ViewHandler], [native_component][pythonnative.sdk._components.native_component], [register_component][pythonnative.sdk._components.register_component], [element_factory][pythonnative.sdk._components.element_factory] |
| Utilities | Utilities | IS_ANDROID, IS_IOS, IS_WEB |
| CLI | CLI (pn) | pn init, pn run, pn clean, and more in the CLI reference |
All visual and layout properties pass through the style dict (or a list of dicts). The full per-component property catalogue lives in Component properties.
| Back | FazBrowse Home | New Git URL |