Every public name lives on the top-levelchirppackage. This page is the
searchable index of that surface: what to import, its one-line job, and how
stable it is.
Names are grouped by maturity:
Stable — safe to build on; the core you reach for every day.
Provisional — works today, may shift between minor versions.
Debug / advanced — introspection and internals you rarely import directly.
The 80% you import to build an app. Each name is importable directly from
chirp:
fromchirpimport(# ApplicationApp,AppConfig,# HTTPRequest,Response,Redirect,FileResponse,JSONResponse,hx_redirect,# Return types (the return type is the intent)Template,InlineTemplate,Fragment,Page,OOB,Stream,Suspense,TemplateStream,ValidationError,Action,FormAction,MutationResult,# Real-timeEventStream,SSEEvent,# MiddlewareMiddleware,Next,AnyResponse,# Request-scoped contextg,get_request,# Authget_user,login,logout,login_required,requires,is_safe_url,# Formsform_from,form_or_errors,form_values,FormBindingError,# ErrorsChirpError,ConfigurationError,HTTPError,MethodNotAllowed,NotFound,PayloadTooLarge,# MarkdownMarkdownRenderer,)
Application
Name
Job
App
The application. Mutable during setup, frozen at runtime.
AppConfig
Frozen dataclass of app configuration. See Configuration.
Appexposes its surface through decorators and methods:
Validate hypermedia contracts (all keyword-only).deploy=Trueruns env-aware rules with production posture.
HTTP
Name
Job
Request
Frozen dataclass for an incoming request. Properties:method, path, query, headers, cookies, content_type. htmx-awareness: is_htmx, is_narrow_fragment, is_boosted, is_history_restore, normalized htmx_target_id / htmx_target_tag, htmx_source_id / htmx_source_tag, unified htmx_trigger, and htmx_request_type. Async body access: body(), text(), json(), form(), stream().
Response
HTTP response with a chainable.with_*() API (with_status, with_header, with_cookie, with_hx_redirect, with_hx_trigger, …).
Redirect
302 redirect convenience:Redirect(url).
FileResponse
Stream a file from disk with the right content type.
JSONResponse
Serialize a value to a JSON response.
hx_redirect
Returns aResponse with both Location and HX-Redirect so one handler serves normal and htmx navigation: hx_redirect(url, status=303, body="", headers=None).
Bind, or return aValidationError. Returns T | ValidationError.
form_values(form)
Convert a dataclass or mapping todict[str, str]for re-populating a form.
FormBindingError
Raised on bind failure;.errors is dict[str, list[str]].
Errors
The full hierarchy, status codes, and handler patterns live in
Errors.
Name
Job
ChirpError
Base exception for all Chirp errors.
ConfigurationError
Invalid configuration (missingsecret_key, etc.).
HTTPError
Base for HTTP errors.
NotFound
404 Not Found.
MethodNotAllowed
405 Method Not Allowed.
PayloadTooLarge
413 Payload Too Large.
Markdown
Name
Job
MarkdownRenderer
Render markdown to HTML (installchirp[markdown]).
Provisional surface
These names work today but may change between minor versions. Most are for
plugin authors, app shells, the reactive system, and the tools/cache layers —
not the everyday request loop.
Provisional names (import direct from `chirp`)
Name
Job
CHIRP_CAPABILITIES
Frozenset of capability flags this build guarantees.
CHIRP_DEFER_PENDING_KEY
String key (__chirp_defer_pending__) Suspense injects into template context. In templates, prefer {% if key is deferred %}— see Streaming HTML.
DEFERRED
Sentinel a Suspense shell uses for an unresolved deferred key.
Wire the ChirpUI component library into an app. See ChirpUI.
Debug / advanced introspection
Render-pipeline internals for inspecting how a request resolved — useful from
middleware or in tests, almost never imported in a handler.
Debug names (import direct from `chirp`)
Name
Job
RenderPlan, get_render_plan()
Inspect the render decision for a request. See Render plan.
SwapResolution, resolve_navigation_swap()
How a navigation maps to a swap target.
PageComposition
Explicit page-composition object Chirp builds when layouts are involved. You return aPage; Chirp constructs this internally.
RegionUpdate
An OOB region swap descriptor produced during composition.
ViewRef
Internal reference to a resolved view.
Deprecated since not in the public API
CLI
Thechirp console command (new, dev, run, check, routes, freeze,
security-check, makemigrations, migrate, shapes-codegen) is documented in
full, with every flag, in the CLI reference.chirp check <app> wraps app.check().