Conversation
- Fix file-analyzer API service: use RenderAsync (async) instead of Render (sync) in async FastAPI handlers, and switch from broken double-await run_task to start_task + await pattern - Add `if __name__ == "__main__":` guard to app.start() in all workflow services to match SDK docs and support CLI dev workflow - Fix root README incorrectly claiming workflows are Python-only (TypeScript is also supported) - Remove unnecessary dict input handling from hello-world double() task (the SDK handles argument mapping automatically)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes a runtime bug in the file-analyzer API service and aligns all examples with documented patterns.
Changes
Fix: file-analyzer API service uses wrong SDK client — The API service used the synchronous
Renderclient inside async FastAPI handlers withawait, which would cause aTypeErrorat runtime. Switched toRenderAsyncand replaced the broken double-awaitrun_taskpattern with the correctstart_task+awaitpattern per the SDK docs.Fix:
app.start()missingif __name__ == "__main__":guard — All six workflow services calledapp.start()at module level. Without it,app.start()fires on import, which breaks theWorkflows.from_workflows()pattern and therender ea tasks devCLI workflow.Fix: root README incorrectly claims workflows are "Python-only" — Render Workflows support both Python and TypeScript. Updated to clarify this repo contains Python examples.
Fix: hello-world
double()has unnecessary dict input handling — The SDK automatically maps dict inputs to function parameters (e.g.,{"x": 5}→x=5). The manualisinstance(x, dict)check was redundant and suggested the SDK doesn't handle this, which is misleading for a beginner example.Files changed
file-analyzer/api-service/main.pyRender→RenderAsync,run_task→start_task+awaithello-world/main.pydouble(), add__main__guardetl-job/main.py__main__guarddata-pipeline/main.py__main__guardfile-processing/main.py__main__guardopenai-agent/main.py__main__guardfile-analyzer/workflow-service/main.py__main__guardREADME.md