| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
Developer-mode warnings and error reporting. This module powers the feedback you get while developing: [PN] WARN messages for suspicious props and styles, the [HookOrderError][pythonnative.HookOrderError] raised on conditional hooks, and the RedBox overlay that surfaces uncaught errors from renders, effects, and event handlers.
Dev mode is enabled automatically by pn start / pn preview and in the debug builds pn run produces, or explicitly with the PN_DEV=1 environment variable. In production builds every check in this module is skipped, so shipping apps pay no overhead.
import pythonnative as pn
if pn.diagnostics.is_dev():
pn.diagnostics.warn("fetching from a staging endpoint")Most apps never call this module directly; it exists so framework code (and custom component libraries) can report problems in a way that reaches the developer instead of disappearing into a log.
::: pythonnative.diagnostics options: show_root_heading: false show_root_toc_entry: false members_order: source filters: ["!^_"]
| Back | FazBrowse Home | New Git URL |