FAIL2BAN-PYTHON(1)
๐ธ NAME ๐ธ
fail2ban-python โ a helper for Fail2Ban to assure that the same Python is used ๐
ok so picture this: Fail2Ban just needs everybody on the same Python, and this lil cutie is the one who makes sure that happens. that's the whole vibe. bestie behavior honestly ๐ซถ
โจ DESCRIPTION โจ
here's how you call it, no cap:
fail2ban-python [option] ... [-c cmd | -m mod | file | -] [arg] ...
and yes, there are options โ and they come with corresponding environment variables</> too, iykyk. every single one, incoming ๐
๐ OPTIONS ๐
-bโ issue warnings about convertingbytes/bytearraytostrand comparingbytes/bytearraywithstrorbyteswithint. and if you go-bb(yes, double) it issues errors instead of warnings. escalate bestie ๐-Bโ don't write.pycfiles on import; alsoPYTHONDONTWRITEBYTECODE=x-c cmdโ program passed in as string. heads up: this terminates the option list. periodt.-dโ turn on parser debugging output. and listen, this one's for experts only, and it only works on debug builds. you've been warned ๐; alsoPYTHONDEBUG=x-Eโ ignorePYTHON*environment variables (such asPYTHONPATH). like, all of 'em. not the vibe today โ-hโ print this help message and exit (also-?or--help). classic icon behavior ๐-iโ inspect interactively after running script; forces a prompt even if stdin does not appear to be a terminal; alsoPYTHONINSPECT=x-Iโ isolate Python from the user's environment (implies-E,-Pand-s). it's giving main character energy, alone in its own little world ๐ฆ-m modโ run library module as a script. also terminates the option list, so mind where you put it.-Oโ remove assert and__debug__-dependent statements; add.opt-1before.pycextension; alsoPYTHONOPTIMIZE=x-OOโ do-Ochanges and also discard docstrings; add.opt-2before.pycextension. double optimized, double slay โจ-Pโ don't prepend a potentially unsafe path tosys.path; alsoPYTHONSAFEPATH. safety first bestie ๐-qโ don't print version and copyright messages on interactive startup. shy girl era ๐ธ-sโ don't add user site directory tosys.path; alsoPYTHONNOUSERSITE=x-Sโ don't imply'import site'on initialization-uโ force the stdout and stderr streams to be unbuffered; this option has no effect on stdin; alsoPYTHONUNBUFFERED=x-vโ verbose (trace import statements); alsoPYTHONVERBOSE=x. and get this โ it can be supplied multiple times to increase verbosity, so you can just keep stacking it, no cap ๐ฅ-Vโ print the Python version number and exit (also--version). when given twice, print more information about the build ๐-W argโ warning control;argisaction:message:category:module:lineno; alsoPYTHONWARNINGS=arg-xโ skip first line of source, allowing use of non-Unix forms of#!cmd-X optโ set implementation-specific option--check-hash-based-pycs always|default|neverโ control how Python invalidates hash-based.pycfiles. pick one of those three values, don't freestyle ๐ซถ--help-envโ print help about Python environment variables and exit--help-xoptionsโ print help about implementation-specific-Xoptions and exit--help-allโ print complete help information and exit. the full lore drop ๐
๐ง ARGUMENTS ๐ง
fileโ program read from script file-โ program read from stdin (default; interactive mode if a tty)arg ...โ arguments passed to program insys.argv[1:]
ok tiny reminder bestie:-c cmdand-m modboth terminate the option list, so anything after them is not an option anymore. plan accordingly ๐
๐ฎ SEE ALSO ๐ฎ
fail2ban-client(1) โ go give her a read too, she's iconic ๐
and that's the whole page, bestie ๐ fail2ban-python 1.1.1, dated August 2026 โ mwah, go forth and Python responsibly ๐โจ
๐ฆ where this page comes from
- arch rolling: fail2ban 1.1.1-1 ยท GPL-2.0-or-later
- nixpkgs unstable: fail2ban 1.1.1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms