Skip to content

API Reference parrot.handlers.video_reel

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.handlers.video_reel

View source

HTTP handler for video reel generation with background job support.

Alias AspectRatio

Re-exported from parrot.models.google.AspectRatio.

Alias FileManagerFactory

Re-exported from parrot.tools.filemanager.FileManagerFactory.

Alias FileManagerInterface

Re-exported from parrot.interfaces.file.FileManagerInterface.

Alias Job

Re-exported from parrot.handlers.jobs.models.Job.

Alias JobManager

Re-exported from parrot.handlers.jobs.JobManager.

Alias JobStatus

Re-exported from parrot.handlers.jobs.JobStatus.

Alias MusicGenre

Re-exported from parrot.models.google.MusicGenre.

Alias MusicMood

Re-exported from parrot.models.google.MusicMood.

Class VideoReelHandler

REST handler for video reel generation using background jobs.

Job ownership (§8 Q7) is resolved from the caller's SESSION via _resolve_session()/_get_session_user_id() — a body-supplied user_id is never trusted as an ownership claim (see post()/ _authorize_job()). Deliberately NOT class-decorated @is_authenticated()/@user_session() (the pattern verified in CredentialsHandler/StudioBaseView during this task's evidence gate): @user_session() unconditionally calls navigator_session.get_session() with no test-friendly short circuit — unlike @is_authenticated()'s documented request["authenticated"] = True bypass, it hard-requires real session-storage middleware to be configured, which this handler's existing test suites (test_video_reel_handler.py, test_video_reel_inputs.py) do not set up. _resolve_session() already implements the SAME "decorated or not" duality StudioBaseView documents (calling the plain, inherited BaseView.session() when nothing has overwritten it), and post() independently rejects an unresolvable session (HTTPUnauthorized) — so the class decorators add no additional security here, only a hard dependency on full session-storage setup this handler does not otherwise need.

Parameter Type Default Description
*args ()
**kwargs {}

Attributes:

Attribute Type Description
job_manager JobManager Resolve JobManager lazily from the request's app.

Method VideoReelHandler.setup

Register routes and ensure JobManager is available.

setup(app: WebApp, route: str = '/api/v1/google/generation/video_reel')

Parameter Type Default Description
app WebApp
route str '/api/v1/google/generation/video_reel'

Method VideoReelHandler.post

Submit a video reel generation job and return immediately.

post() -> web.Response

Returns: web.Response

Method VideoReelHandler.get

Return job status/result, or a specific artifact, otherwise the schema catalog.

job_id may come from the route or the ?job_id= query string (_resolve_job_id raises 400 if both are given and disagree). Schema-catalog behavior (no job_id at all) is unchanged and requires no ownership check — there is no job to own.

get() -> web.Response

Returns: web.Response

Alias VideoReelRequest

Re-exported from parrot.models.google.VideoReelRequest.

Alias VideoReelScene

Re-exported from parrot.models.google.VideoReelScene.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally