Skip to content

Instantly share code, notes, and snippets.

@alisterburt
Created May 11, 2023 08:13
Show Gist options
  • Select an option

  • Save alisterburt/4aecc24e0b08a971c6cb3ca62b30d262 to your computer and use it in GitHub Desktop.

Select an option

Save alisterburt/4aecc24e0b08a971c6cb3ca62b30d262 to your computer and use it in GitHub Desktop.
typer CLI example for maddie
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