I know that ufw is written in python. Is it possible to use ufw as an api via python?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sure, the
ufwexecutable is just a thin wrapper around a python package with the same name. I’m not aware of any documentation, but you can just poke around the source and have a look how everything works. Find theufwscript location usingwhich ufwand the package location by starting the python interpreter, importing theufwmodule and asking it for its import path: