Python client library for FauxAPI available on PyPi
-
Recently pushed PyPi package pfsense-fauxapi that implements a client-side wrapper to the pfSense-FauxAPI package.
Install using pip:-
pip3 install pfsense-fauxapi
Check it out here:-
https://github.com/ndejong/pfsense_fauxapi_client_pythonThe pip package additionally wraps the Python interface as a command-line tool thus making FauxAPI calls to pfSense even easier, for example:-
$ fauxapi --host 192.168.1.200 gateway_status | jq . { "callid": "5c8d0f7361cba", "action": "gateway_status", "message": "ok", "data": { "gateway_status": { "10.10.10.1": { "monitorip": "10.10.10.1", "srcip": "10.10.10.200", "name": "WAN_DHCP", "delay": "0.422ms", "stddev": "0.073ms", "loss": "0.0%", "status": "none" } } } }
The Python client library and the command-line tool support the full set of FauxAPI calls:-
- alias_update_urltables
- config_backup
- config_backup_list
- config_get
- config_patch
- config_reload
- config_restore
- config_set
- function_call
- gateway_status
- interface_stats
- rule_get
- send_event
- system_reboot
- system_stats
There are now four client-side implementations for FauxAPI to choose from:-
- Python: https://github.com/ndejong/pfsense_fauxapi_client_python
- NodeJS: https://github.com/Elucidia/faux-api-client
- PHP: https://github.com/travisghansen/pfsense_fauxapi_php_client
- Shell/Bash: https://github.com/ndejong/pfsense_fauxapi_client_bash