Core
The runtime heart: the application class, configuration, the request context, the shared extension registry and the constants the framework reads its switches from.
Fluid
from webfluid import Fluid — the application, a subclass of FastAPI.
Fluid(import_name)— constructs the app; parses config, sets up static, jinja, middleware and the optioned batteries.render(template, **ctx)— async render through the context processors and the Jinja environment.mix()/start()— run the app (blocking / the underlying coroutine).startup_hook(fn)/shutdown_hook(fn)— register lifecycle callbacks (no required args).before_request(fn)/after_request(fn)/context_processor(fn)— request-level hooks.add_theme(name, link)/get_theme()/set_theme(request, name)— theme management (needsWF_THEMES).limit— the slowapi limiter decorator (or a no-op when rate limiting is off).asgi_app— the app, wrapped in proxy-headers middleware whenPROXY_FIXis set.config,jinja_env,jinja_context,sources,name,app_root,additive_root— runtime attributes.
webfluid.core.config
register_config(priority=1)— class decorator registering a config; priority 1–10, higher overrides lower.Config— the resolved config dict;from_objectpulls in upper-cased attributes.DefaultConfig— the framework defaults every config inherits from.init_configs(fluid)/build_config()— auto-import and merge config classes (used internally).
webfluid.core.context
FluidContext— the per-request context;FluidContext.current()returns it, exposing.fluid,.requestand arbitrary stored data.BaseContext— the contextvar-backed base used by the executor, babel domain and log contexts.
webfluid.core.ext
The shared, ready-to-use battery instances. Import the one you need:
from webfluid.core.ext import (
scheduler, # APScheduler AsyncIOScheduler
db, # SQLAlchemy
babel, # Babel
events, # EventManager
cache, # Cache
mail, # Mail
jwt # JWTManager
)
webfluid.core.constants
FRAMEWORK_ROOT,FRAMEWORK_ID— the package root and id ("fluid").APP_STATIC,WF_STATIC— the static mount prefixes.DEBUG,EXECUTION— whether debug mode / a live run is active.THEMES,TAILWIND,PROCESSING,ADDITIVES— resolved feature switches.EXT_SCHEDULING,EXT_SQLALCHEMY,EXT_BABEL,EXT_EVENTS,EXT_CACHE,EXT_MAIL,EXT_JWT— resolved extension switches.
webfluid.version
version()— returns the runningFluidVersion.FluidVersion— a comparable(major, minor, patch)tuple.
Continue reading
From here you can continue straight with Extensions.