Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import click
- def transform_data(paths): ...
- def save_result(data, path): ...
- @click.command()
- @click.argument('output-path') # first argument
- @click.argument('input-paths', nargs=-1) # all other arguments
- def cli(output_path, input_paths):
- result = transform_data(paths=input_paths)
- save_result(data=result, path=output_path)
- if __name__ == '__main__':
- cli()
Add Comment
Please, Sign In to add comment