>>>cit.start()
# blank line>>>cit.title("Session Name")
+--------------+|SESSIONNAME|+--------------+>>>cit.echo("Hello World")
|HelloWorld>>>cit.echo("Hello World", pre="say", bar="!")
! (Say) HelloWorld>>>cit.ask("Hello World")
| (?) HelloWorld>>>cit.info("Hello World")
| (Info) HelloWorld>>>cit.warn("Hello World")
| (Warning) HelloWorld>>>cit.err("Hello World")
| (Error) HelloWorld>>>cit.mute("Hello World")
|HelloWorld# muted by dim>>>cit.print("[yellow]Hello World[/]") # print with stylesHelloWorld>>>cit.print(cit.escape("[yellow]Hello World[/]")) # escape `[` -> `\[` if not escaped. escape `\` -> `\\` if not used as escape char.
[\]
>>>cit.markdown("# Header") # print markdown+--------------+|Header|+--------------+>>>cit.rule() # print horizontal rule---------------------------------------->>>cit.rule("Title", style="blue", align="center") # print horizontal rule with Title. align = center|left|right----------------Title---------------->>>cit.panel("Panel", title="Panel Title", subtitle="Panel Subtitle") # print text in a panel+----------PanelTitle----------+|Panel|# full width+--------PanelSubtitle---------+>>>cit.panel("Panel", title="Panel Title", subtitle="Panel Subtitle", expand=False, style="blue") # fit panel to text+-PanelTitle-+# blue|Panel|+-PanelSubtit-+>>>cit.end()
`
>>>cit.br()
# blank line>>>cit.br(2)
# blank line# blank line>>>forvarincit.track(iterables, "Progress"): pass| : Progress---------------------===================52%0:00:52-52/100>>>cit.__ascii__=True# use ascii chars only.
Get User Input
>>>cit.get_input() # Get user input from stdin>HelloWorld'Hello World'>>>cit.get_input("Question?") # With a question| (?) Question?
>Yes'Yes'>>>cit.get_input(prompt="Answer:") # With a customized prompt.Answer: Apple'Apple'>>>cit.get_input("Continue?", default="yes") # With a default answer.| (?) Continue?
> (yes) # Entered nothing'yes'>>>cit.get_input(strip=False) # Do not remove leading and trailing whitespaces from user input.># Whitespaces' '>>>cit.get_choice(["Apple", "Google"]) # Enter number to select.|1) Apple|2) Google>2'Google'>>>cit.get_choice(["Apple", "Google"]) # Enter string is ok too.|1) Apple|2) Google>Google'Google'>>>cit.get_choice(["Apple", "Google"], exitable=True) # Add a choice of exit in menu.|1) Apple|2) Google|0) **EXIT**>0None>>>cit.get_choices(["Apple", "Google"]) # Multiple Selection|1) [ ] Apple|2) [ ] Google>1# Enter number to check or uncheck selections|1) [+] Apple|2) [ ] Google|0) **DONE**>Google# Enter string is ok too.|1) [+] Apple|2) [+] Google|0) **DONE**>0# Enter 0 when done.
['Apple', 'Google'] # return [] is no selections.>>>cit.get_choices(["Apple", "Google"], allable=True) # Add a choice of select all in menu.|a) **ALL**|1) [ ] Apple|2) [ ] Google>a# Enter `a` to check all. If `a` is in choices, enter `all`.|a) **ALL**|1) [+] Apple|2) [+] Google|0) **DONE**>0
['Apple', 'Google']
>>>cit.get_choices(["Apple", "Google"], exitable=True) # Add a choice of exit in menu.|1) [ ] Apple|2) [ ] Google|0) **EXIT**>0
[] # Empty list returned.
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.