PSERVE3(1)

πŸ“¦
version 2.0.2 Β· 5 versions
, in debian trixie, ubuntu resolute

πŸ’– PSERVE3 πŸ’–

okay so welcome to the pserve3 page bestie, it's the Python 3 Pyramid command and she's literally the moment. this is from the User Commands manual, so you know it's official. let's get into it πŸ¦‹


🌸 NAME 🌸

pserve3 β€” the Python 3 Pyramid command. that's her. that's the whole name. iconic of her honestly πŸ’…


✨ DESCRIPTION ✨

okay so first thing, here's how you actually call her, no cap:

usage: pserve3 [-h] [-n NAME] [-s SERVER_TYPE] [--server-name SECTION_NAME]
       [--reload] [--reload-interval RELOAD_INTERVAL] [-b] [-v] [-q]
       [config_uri] [config_vars ...]

so basically this command serves a web application that uses a PasteDeploy configuration file for the server and the application. like, both of them. it's giving full service, main character energy πŸ‘‘

and here's the cute lil trick β€” you can also include variable assignments like http_port=8080 and then use %(http_port)s in your config files. yes bestie, that's the whole vibe, you drop the value on the command line and reference it in the file. it's giving ✨templating✨


🫢 positional arguments

  • config_uri β€” the URI to the configuration file. that's your config, that's the thing, that's what she needs πŸŽ€
  • config_vars β€” variables required by the config file. for example, http_port=%(http_port)s would expect http_port=8080 to be passed here. so like, the config file is asking for a thing and you're the one supplying it. teamwork fr fr 🀝

🧚 options

  • -h, --help β€” show this help message and exit. the classic. the universal "wait what do i do" button πŸ™ˆ
  • -n NAME, --app-name NAME β€” load the named application. and heads up, the default is main πŸ’œ
  • -s SERVER_TYPE, --server SERVER_TYPE β€” use the named server. pick your fighter, choose your server type 🌈
  • --server-name SECTION_NAME β€” use the named server as defined in the configuration file. default here is main too, so if you don't say anything she's gonna assume main πŸ‘‘
  • --reload β€” use the auto-restart file monitor. she watches your files and restarts herself when they change. lowkey the most useful flag on this whole page honestly πŸ”₯
  • --reload-interval RELOAD_INTERVAL β€” seconds between checking files. but bestie listen, a low number can cause significant CPU usage ⚠️ so don't set it to like, zero, she WILL chug your processor 😭
  • -b, --browser β€” open a web browser to the server url. and where does she get that url from, you ask? the open_url setting in the pserve section of the configuration file. so it's all coming from your config, she's not out here guessing πŸ’…
  • -v, --verbose β€” set verbose level. default is 1, so she's already talking a normal amount πŸ—£οΈ
  • -q, --quiet β€” suppress verbose output. for when you want her to be chill and not yap. the silence is giving peace πŸ“

πŸ’€ reminder that --reload-interval with a tiny number = CPU going feral. keep it reasonable, bestie, your fans will thank you.

pserve3 2.0.2+dfsg-1 β€” December 2024 πŸŽ€ that's the version and the date babes, so if anyone asks, that's the era this page is from. now go serve that web app, you've got this, periodt πŸ’–βœ¨

πŸ“¦ where this page comes from