state
¶
Global server state shared across API modules.
Keeping state in a dedicated module prevents the classic 'main vs package
module' duplication that occurs when api_server.py is run with python -m.
All modules that need the generator or server args should import from here.
Classes¶
Functions¶
fastvideo.entrypoints.openai.state.clear_state
¶
fastvideo.entrypoints.openai.state.get_generator
¶
get_generator() -> VideoGenerator
Return the global VideoGenerator instance (set during startup).
fastvideo.entrypoints.openai.state.get_server_args
¶
get_server_args() -> FastVideoArgs
Return the global FastVideoArgs (set during startup).
fastvideo.entrypoints.openai.state.set_state
¶
set_state(generator: VideoGenerator, fastvideo_args: FastVideoArgs, output_dir: str) -> None
Set all server state at once (called from lifespan).