Created
May 11, 2023 08:13
-
-
Save alisterburt/4aecc24e0b08a971c6cb3ca62b30d262 to your computer and use it in GitHub Desktop.
typer CLI example for maddie
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
| from pathlib import Path | |
| import typer | |
| cli = typer.Typer() | |
| @cli.command(no_args_is_help=True) | |
| def my_command_line_interface( | |
| pixel_size: float = 1.0, | |
| input_filename: Path = Path('bla'), | |
| output_filename: Path = Path('bla2'), | |
| ): | |
| print('lallalaa') | |
| if __name__ == '__main__': | |
| cli() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment