Skip to content
Myr

:memo: Add docs for first steps

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sebastián Ramírez · committed by Sebastián Ramírez · parent fad33cb · Browse files · 5 files+51 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

5 files+51 added−0 removed

  • other:+51 added−0 removed

5 files+51 added−0 removed

added:docs/src/first_steps/tutorial001.py+9 added
1import typer234def main():5 typer.echo("Hello World")678if __name__ == "__main__":9 typer.run(main)
added:docs/src/first_steps/tutorial002.py+9 added
1import typer234def main(name: str):5 typer.echo(f"Hello {name}")678if __name__ == "__main__":9 typer.run(main)
added:docs/src/first_steps/tutorial003.py+9 added
1import typer234def main(name: str, lastname: str):5 typer.echo(f"Hello {name} {lastname}")678if __name__ == "__main__":9 typer.run(main)
added:docs/src/first_steps/tutorial004.py+12 added
1import typer234def main(name: str, lastname: str, formal: bool = False):5 if formal:6 typer.echo(f"Good day Ms. {name} {lastname}.")7 else:8 typer.echo(f"Hello {name} {lastname}")91011if __name__ == "__main__":12 typer.run(main)
added:docs/src/first_steps/tutorial005.py+12 added
1import typer234def main(name: str, lastname: str = "", formal: bool = False):5 if formal:6 typer.echo(f"Good day Ms. {name} {lastname}.")7 else:8 typer.echo(f"Hello {name} {lastname}")91011if __name__ == "__main__":12 typer.run(main)