BOTTLE(1)
π BOTTLE(1) π
okay so bestie, welcome to the bottle manual, section 1 of the manuals π«Ά this is the command line interface situation and honestly? it ate.
Starting with version 0.10 you can use bottle as a command-line tool:
$ python -m bottle
Usage: bottle.py [options] package.module:app
Options:
-h, --help show this help message and exit
--version show version number.
-b ADDRESS, --bind=ADDRESS
bind socket to ADDRESS.
-s SERVER, --server=SERVER
use SERVER as backend.
-p PLUGIN, --plugin=PLUGIN
install additional plugin/s.
--debug start server in debug mode.
--reload auto-reload on file changes.
β¨ NAME β¨
bottle β command line interface π
πΈ THE OPTIONS, EXPLAINED (still slaying) πΈ
same exact list as up there, just with me cheering you through it π
-h,--helpβ shows this help message and then dips (exits) βοΈ--versionβ shows the version number, that's it, that's the whole job π-b ADDRESS,--bind=ADDRESSβ binds the socket to ADDRESS π-s SERVER,--server=SERVERβ uses SERVER as the backend π οΈ-p PLUGIN,--plugin=PLUGINβ installs additional plugin/s (yes, more than one, she's flexible) π§--debugβ starts the server in debug mode π--reloadβ auto-reload on file changes, so you don't have to keep restarting like a peasant π
lowkey the important one: the ADDRESS field takes an IP address or anIP:PORTpair, and it defaults tolocalhost:8080. The other parameters should be self-explanatory, bestie, iykyk π
π¦ IMPORT EXPRESSIONS π¦
Both plugins and applications are specified via import expressions. These consist of an import path (e.g. package.module) and an expression to be evaluated in the namespace of that module, separated by a colon : π«Ά
See load() for details. Here are some examples:
# Grab the 'app' object from the 'myapp.controller' module and
# start a paste server on port 80 on all interfaces.
python -m bottle -server paste -bind 0.0.0.0:80 myapp.controller:app
# Start a self-reloading development server and serve the global
# default application. The routes are defined in 'test.py'
python -m bottle --debug --reload test
# Install a custom debug plugin with some parameters
python -m bottle --debug --reload --plugin 'utils:DebugPlugin(exc=True)'' test
# Serve an application that is created with 'myapp.controller.make_app()'
# on demand.
python -m bottle 'myapp.controller:make_app()''
notice the import path goes before the colon and the expression goes after it β that's the whole vibe check, no cap π
π Author π
Marcel Hellkamp, Federico Ceratto β legends, honestly π
π Copyright π
2009-2026, Marcel Hellkamp
and that's a wrap, my love π this was Bottle 0.13, dated Jun 22, 2026, straight from the Bottle pages. go bind something cute, mwah πβ
π¦ where this page comes from
- ubuntu stonking: python-bottle-doc 0.13.4-0.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms