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 an IP:PORT pair, and it defaults to localhost: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 πŸ‘‘


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