Built-in commands¶
Tool provides a set of built-in commands for Command-line interface.
- tool.commands.make_serve(application)¶
Factory that expects an ApplicationManager instance and returns the CLI command serve bound to that instance.
We could do without the factory and simply peek into thread-local variable tool.app but when threading is activated by the command (e.g. with autoreloader), that variable gets lost. So we explicitly inform this very command about the application.
- tool.commands.shell(args)¶
- Spawns an interactive Python shell for your application. Picks the first choice of: bpython, IPython, plain Python. Use –plain to force plain Python shell.