Closed iamsinghal closed 4 months ago
This pull request refactors the pymusiclooper
CLI to allow direct invocation of methods without the need for CLI commands, and introduces a Flask server to handle requests programmatically. The changes include modifying the cli_main
function to accept a dictionary of arguments, updating command functions to be callable directly, and adding a new Flask server in server.py
to handle HTTP requests.
Files | Changes |
---|---|
pymusiclooper/cli.py pymusiclooper/handler.py |
Refactored CLI functions to support direct method invocation and added functionality to return results for further processing. |
server.py |
Added a new Flask server to handle HTTP requests and invoke cli_main programmatically. |
This PR is not intended to be here in this repo.
Summary by Sourcery
This pull request refactors the CLI to accept keyword arguments, introduces a Flask server to invoke methods directly, and enhances the handler to return loop pairs for further processing.
server.py
to invokecli_main
directly via HTTP requests.cli_main
to accept a dictionary of keyword arguments instead of individual parameters.run_handler
to return loop pairs and print the first pair for debugging purposes.run_and_return_all_loop_pairs
inhandler.py
to retrieve and format loop pairs.