@@ -5,29 +5,30 @@ Python Prompt Toolkit
55
66.. image :: https://github.com/prompt-toolkit/python-prompt-toolkit/raw/master/docs/images/logo_400px.png
77
8- *``prompt_toolkit`` is a library for building powerful interactive command line
9- applications in Python. *
8+ ``prompt_toolkit `` *is a library for building powerful interactive command line applications in Python. *
109
1110Read the `documentation on readthedocs
1211<http://python-prompt-toolkit.readthedocs.io/en/stable/> `_.
1312
1413NOTICE: prompt_toolkit 3.0
1514**************************
1615
17- Please notice that this branch is the prompt_toolkit 3.0 branch. For most
18- users, it should be compatible with prompt_toolkit 2.0, but it requires at
19- least Python 3.6. On the plus side, prompt_toolkit 3.0 is completly type
16+ Please notice that this branch is the `` prompt_toolkit `` ** 3.0 ** branch. For most
17+ users, it should be compatible with `` prompt_toolkit `` ** 2.0 ** , but it requires at
18+ least ** Python 3.6 ** . On the plus side, `` prompt_toolkit `` ** 3.0 ** is completly type
2019annotated and uses asyncio natively.
2120
2221
23- Ptpython
24- ********
22+ Gallery
23+ *******
2524
2625`ptpython <http://github.com/prompt-toolkit/ptpython/ >`_ is an interactive
27- Python Shell, build on top of prompt_toolkit.
26+ Python Shell, build on top of `` prompt_toolkit `` .
2827
2928.. image :: https://github.com/prompt-toolkit/python-prompt-toolkit/raw/master/docs/images/ptpython.png
3029
30+ `More examples <https://python-prompt-toolkit.readthedocs.io/en/stable/pages/gallery.html >`_
31+ ^^^^
3132
3233prompt_toolkit features
3334***********************
@@ -38,14 +39,13 @@ more than that.
3839
3940Some features:
4041
41- - Pure Python.
42+ - ** Pure Python ** .
4243- Syntax highlighting of the input while typing. (For instance, with a Pygments lexer.)
4344- Multi-line input editing.
4445- Advanced code completion.
4546- Both Emacs and Vi key bindings. (Similar to readline.)
4647- Even some advanced Vi functionality, like named registers and digraphs.
4748- Reverse and forward incremental search.
48- - Runs on all Python versions from 2.6 up to 3.7.
4949- Works well with Unicode double width characters. (Chinese input.)
5050- Selecting text for copy/paste. (Both Emacs and Vi style.)
5151- Support for `bracketed paste <https://cirw.in/blog/bracketed-paste >`_.
@@ -61,6 +61,20 @@ Feel free to create tickets for bugs and feature requests, and create pull
6161requests if you have nice patches that you would like to share with others.
6262
6363
64+ Installation
65+ ************
66+
67+ ::
68+
69+ pip install prompt_toolkit
70+
71+ For Conda, do:
72+
73+ ::
74+
75+ conda install -c https://conda.anaconda.org/conda-forge prompt_toolkit
76+
77+
6478About Windows support
6579*********************
6680
@@ -77,21 +91,6 @@ general, the Unix experience will still be a little better.
7791For Windows, it's recommended to use either `cmder
7892<http://cmder.net/> `_ or `conemu <https://conemu.github.io/ >`_.
7993
80-
81- Installation
82- ************
83-
84- ::
85-
86- pip install prompt_toolkit
87-
88- For Conda, do:
89-
90- ::
91-
92- conda install -c https://conda.anaconda.org/conda-forge prompt_toolkit
93-
94-
9594Getting started
9695***************
9796
@@ -114,71 +113,11 @@ Note for Python 2: all strings are expected to be unicode strings. So, either
114113put a small ``u `` in front of every string or put ``from __future__ import
115114unicode_literals `` at the start of the above example.
116115
117-
118- Projects using prompt_toolkit
119- *****************************
120-
121- Shells:
122-
123- - `ptpython <http://github.com/prompt-toolkit/ptpython/ >`_: Python REPL
124- - `ptpdb <http://github.com/jonathanslenders/ptpdb/ >`_: Python debugger (pdb replacement)
125- - `pgcli <https://www.pgcli.com/ >`_: Postgres client.
126- - `mycli <https://www.mycli.net/ >`_: MySql client.
127- - `litecli <https://litecli.com/ >`_: SQLite client.
128- - `wharfee <http://wharfee.com/ >`_: A Docker command line.
129- - `xonsh <http://xon.sh/ >`_: A Python-ish, BASHwards-compatible shell.
130- - `saws <https://github.com/donnemartin/saws >`_: A Supercharged AWS Command Line Interface.
131- - `cycli <https://github.com/nicolewhite/cycli >`_: A Command Line Interface for Cypher.
132- - `crash <https://github.com/crate/crash >`_: Crate command line client.
133- - `vcli <https://github.com/dbcli/vcli >`_: Vertica client.
134- - `aws-shell <https://github.com/awslabs/aws-shell >`_: An integrated shell for working with the AWS CLI.
135- - `softlayer-python <https://github.com/softlayer/softlayer-python >`_: A command-line interface to manage various SoftLayer products and services.
136- - `ipython <http://github.com/ipython/ipython/ >`_: The IPython REPL
137- - `click-repl <https://github.com/click-contrib/click-repl >`_: Subcommand REPL for click apps.
138- - `haxor-news <https://github.com/donnemartin/haxor-news >`_: A Hacker News CLI.
139- - `gitsome <https://github.com/donnemartin/gitsome >`_: A Git/Shell Autocompleter with GitHub Integration.
140- - `http-prompt <https://github.com/eliangcs/http-prompt >`_: An interactive command-line HTTP client.
141- - `coconut <http://coconut-lang.org/ >`_: Functional programming in Python.
142- - `Ergonomica <https://github.com/ergonomica/ergonomica >`_: A Bash alternative written in Python.
143- - `Kube-shell <https://github.com/cloudnativelabs/kube-shell >`_: Kubernetes shell: An integrated shell for working with the Kubernetes CLI
144- - `mssql-cli <https://github.com/dbcli/mssql-cli >`_: A command-line client for Microsoft SQL Server.
145- - `robotframework-debuglibrary <https://github.com/xyb/robotframework-debuglibrary >`_: A debug library and REPL for RobotFramework.
146- - `ptrepl <https://github.com/imomaliev/ptrepl >`_: Run any command as REPL
147- - `clipwdmgr <https://github.com/samisalkosuo/clipasswordmgr >`_: Command Line Password Manager.
148- - `slacker <https://github.com/netromdk/slacker >`_: Easy access to the Slack API and admin of workspaces via REPL.
149- - `EdgeDB <https://edgedb.com/ >`_: The next generation object-relational database.
150- - `pywit <https://github.com/wit-ai/pywit >`_: Python library for Wit.ai.
151- - `objection <https://github.com/sensepost/objection >`_: Runtime Mobile Exploration.
152- - `habu <https://github.com/portantier/habu >`_: Python Network Hacking Toolkit.
153- - `nawano <https://github.com/rbw/nawano >`_: Nano cryptocurrency wallet
154- - `athenacli <https://github.com/dbcli/athenacli >`_: A CLI for AWS Athena.
155- - `vulcano <https://github.com/dgarana/vulcano >`_: A framework for creating command-line applications that also runs in REPL mode.
156- - `kafka-shell <https://github.com/devshawn/kafka-shell >`_: A supercharged shell for Apache Kafka.
157-
158- Full screen applications:
159-
160- - `pymux <http://github.com/prompt-toolkit/pymux/ >`_: A terminal multiplexer (like tmux) in pure Python.
161- - `pyvim <http://github.com/prompt-toolkit/pyvim/ >`_: A Vim clone in pure Python.
162- - `freud <http://github.com/stloma/freud/ >`_: REST client backed by SQLite for storing servers
163- - `pypager <https://github.com/prompt-toolkit/pypager >`_: A $PAGER in pure Python (like "less").
164- - `kubeterminal <https://github.com/samisalkosuo/kubeterminal >`_: Kubectl helper tool.
165-
166- Libraries:
167-
168- - `ptterm <https://github.com/prompt-toolkit/ptterm >`_: A terminal emulator
169- widget for prompt_toolkit.
170- - `PyInquirer <https://github.com/CITGuru/PyInquirer/ >`_: A Python library that
171- wants to make it easy for existing Inquirer.js users to write immersive
172- command line applications in Python.
173-
174- (Want your own project to be listed here? Please create a GitHub issue.)
175-
176-
177116Philosophy
178117**********
179118
180- The source code of ``prompt_toolkit `` should be readable, concise and
181- efficient. We prefer short functions focusing each on one task and for which
119+ The source code of ``prompt_toolkit `` should be ** readable **, ** concise ** and
120+ ** efficient ** . We prefer short functions focusing each on one task and for which
182121the input and output types are clearly specified. We mostly prefer composition
183122over inheritance, because inheritance can result in too much functionality in
184123the same object. We prefer immutable objects where possible (objects don't
@@ -192,6 +131,9 @@ sufficient for most use cases. Thinking about algorithms and efficiency is
192131important, but avoid premature optimization.
193132
194133
134+ `Projects using prompt_toolkit <PROJECTS.rst >`_
135+ ***********************************************
136+
195137Special thanks to
196138*****************
197139
@@ -217,10 +159,3 @@ Special thanks to
217159.. |Codecov | image :: https://codecov.io/gh/prompt-toolkit/python-prompt-toolkit/branch/master/graphs/badge.svg?style=flat
218160 :target: https://codecov.io/gh/prompt-toolkit/python-prompt-toolkit/
219161
220-
221- Other libraries and implementations in other languages
222- ******************************************************
223-
224- - `go-prompt <https://github.com/c-bata/go-prompt >`_: building a powerful
225- interactive prompt in Go, inspired by python-prompt-toolkit.
226- - `urwid <http://urwid.org/ >`_: Console user interface library for Python.
0 commit comments