Skip to content

Commit

Permalink
docs: add myke example
Browse files Browse the repository at this point in the history
  • Loading branch information
Donald Mellenbruch authored and Donald Mellenbruch committed Jun 8, 2023
1 parent 25e68f3 commit 7469633
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ pip install -r requirements.txt
```sh
./demo_yapx.py --tui
```

```sh
myke --myke-file ./demo_myke.py
```
17 changes: 17 additions & 0 deletions examples/demo_myke.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from myke import task

@task(root=True)
def setup(log_level="info"):
print(f"Log level: {log_level}")

@task
def hello(name):
print(f"Hello {name}")

@task
def goodbye(name, formal=False):
if formal:
print(f"Goodbye Ms. {name}. Have a good day.")
else:
print(f"Bye {name}!")

1 change: 1 addition & 0 deletions examples/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
..[click,typer]
yapx[tui]==0.1.*
myke[tui]==0.1.*

0 comments on commit 7469633

Please sign in to comment.