-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Pytrickle cli template #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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.
There was a problem hiding this 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
feat: Add new examples and update project structure
… examples import by adding init
chore(examples): Move examples back to root, fix cli import of examples
|
Merged changes and some cleanup. Final review @eliteprox |
eliteprox
left a comment
There was a problem hiding this 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.
This PR introduces a pytrickle CLI command that generates starter templates for building streaming pipelines.
Usage:
The generated app works as a passthrough example so the user can see the working app and modify it to fit their pipeline.