Skip to content

Conversation

@JJassonn69
Copy link
Contributor

This PR introduces a pytrickle CLI command that generates starter templates for building streaming pipelines.

Usage:

pytrickle init my_app --port 8000 --out ./my_app.py

The generated app works as a passthrough example so the user can see the working app and modify it to fit their pipeline.

@JJassonn69 JJassonn69 requested a review from eliteprox November 6, 2025 13:35
- Improved CLI functionality to scaffold applications based on example templates.
- Introduced new example applications: `my_app.py`, `my_template_app.py`, and `passthrough_example.py` demonstrating various media processing techniques.
- Updated `MANIFEST.in` to include example requirements from the correct path.
- Removed the obsolete `process_video_example.py` and its associated Dockerfile.
- Enhanced `pyproject.toml` to reflect the new structure and dependencies.
Copy link
Collaborator

@eliteprox eliteprox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JJassonn69 This is a neat feature, great work! Can we refactor a bit to ensure that the CLI template code is not stored in a static string?

We can consolidate cli templates into the examples folder and use cli.py to generate from them, providing dual-use of examples as templates and giving the benefit of linting / and validation at build instead of runtime.

I quickly drafted some changes to make this possible, take a look at #55

@JJassonn69
Copy link
Contributor Author

Merged changes and some cleanup. Final review @eliteprox

@JJassonn69 JJassonn69 requested a review from eliteprox November 10, 2025 17:51
Copy link
Collaborator

@eliteprox eliteprox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! We should add some docs to the README or proceed with website docs as in livepeer/comfystream#503

python -m pytrickle.cli list

Available templates:

  grayscale_chipmunk   Example demonstrating decorator-based handlers that styli...
  passthrough          Minimal passthrough example for PyTrickle
  process_video        OpenCV Green Processor using decorator-based handlers

python -m pytrickle.cli init process_video

✅ Created: process_video.py
   Template: passthrough
   Run with: python process_video.py
   Edit the handlers to customize your pipeline.

@JJassonn69 JJassonn69 merged commit c1f9528 into main Nov 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants