fasthx.core_decorators
    
            hx(render, *, no_data=False, render_error=None)
    Decorator that converts a FastAPI route's return value into HTML if the request was an HTMX one.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                render
             | 
            
                  RenderFunction[T]
             | 
            
               The render function converting the route's return value to HTML.  | 
            required | 
                no_data
             | 
            
                  bool
             | 
            
               If set, the route will only accept HTMX requests.  | 
            
                  False
             | 
          
                render_error
             | 
            
                  RenderFunction[Exception] | None
             | 
            
               Optional render function for handling exceptions raised by the decorated route.
If not   | 
            
                  None
             | 
          
Returns:
| Type | Description | 
|---|---|
                  Callable[[MaybeAsyncFunc[P, T | Response]], Callable[P, Coroutine[None, None, T | Response]]]
             | 
            
               The rendered HTML for HTMX requests, otherwise the route's unchanged return value.  | 
          
Source code in fasthx/core_decorators.py
              
            page(render, *, render_error=None)
    Decorator that converts a FastAPI route's return value into HTML.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                render
             | 
            
                  RenderFunction[T]
             | 
            
               The render function converting the route's return value to HTML.  | 
            required | 
                render_error
             | 
            
                  RenderFunction[Exception] | None
             | 
            
               Optional render function for handling exceptions raised by the decorated route.
If not   | 
            
                  None
             |