Skip to content

Commit 5893b59

Browse files
committed
feat: Add support for Typer
1 parent b9ddd90 commit 5893b59

File tree

4 files changed

+59
-44
lines changed

4 files changed

+59
-44
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pip install trogon
9090

9191
## Quickstart
9292

93+
### Click
9394
1. Import `from trogon import tui`
9495
2. Add the `@tui` decorator above your click app. e.g.
9596
```python
@@ -100,6 +101,15 @@ pip install trogon
100101
```
101102
3. Your click app will have a new `tui` command available.
102103

104+
### Typer
105+
1. Import `from trogon import tui`
106+
2. Add the `tui` decorator above your typer app. e.g.
107+
```python
108+
cli = Typer(...)
109+
cli = tui()(cli)
110+
```
111+
3. Your click app will have a new `tui` command available.
112+
103113
See also the `examples` folder for two example apps.
104114

105115
## Follow this project

poetry.lock

Lines changed: 26 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ python = "^3.7"
3030
textual = {version = ">=0.26.0"}
3131
#textual = {extras = ["dev"], path = "../textual", develop = true}
3232
click = ">=8.0.0"
33+
typer = "^0.9.0"
3334

3435

3536
[tool.poetry.group.dev.dependencies]

0 commit comments

Comments
 (0)