This project has been archived by its maintainers, and is no longer receiving any updates.
PfsenseFauxapi - Python Interface
Python client for pfSense-FauxAPI - https://github.com/ndejong/pfsense_fauxapi
Install
via PyPi
pip3 install pfsense-fauxapi
Install via Source
# obtain the source material
git clone https://github.com/ndejong/pfsense_fauxapi_client_python.git
cd pfsense_fauxapi_client_python
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
python3 setup.py clean
python3 setup.py test
python3 setup.py install
Code Examples
Three Python code samples are provided that demonstrate interface usage
function-iterate.py- iterates (almost) all the FauxAPI functions to confirm operation.update-aws-aliases.py- downloads the latest AWSip-ranges.jsonand populates the pfsense alias table(s).usergroup-management.py- demonstrates the ability to manage users and groups programmatically.
Command Line
Additionally this pip-package provides a command-line interface to work with FauxAPI
usage: fauxapi [-h] [--host [host]] [--apikey [key]] [--apisecret [secret]]
[--verified-ssl] [--debug]
[function] [[function] ...] [[function-args]]
FauxAPI
optional arguments:
-h, --help show this help message and exit
Call:
--host [host] Host address of the target pfSense host with the
PfsenseFauxapi package installed.
--apikey [key] FauxAPI apikey value - alternatively via the
FAUXAPI_APIKEY environment variable.
--apisecret [secret] FauxAPI apisecret value - alternatively via the
FAUXAPI_APIKEY environment variable.
--verified-ssl Enable SSL certificate checks - default does NOT check
SSL certificates.
--debug Enable debug response from the remote FauxAPI -
helpful in tracking down issues.
[function] The FauxAPI function being called
[function-args] Arguments to the function, space separated
Command line example, using environment variables to pass the FAUXAPI_APIKEY
and FAUXAPI_APIKEY credentials.
$ fauxapi --host 192.168.1.200 gateway_status | jq .
{
"callid": "5c8d0f7361cba",
"action": "gateway_status",
"message": "ok",
"data": {
"gateway_status": {
"10.11.12.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"
}
}
}
}
Metadata
Release files for pfsense-fauxapi 20200718.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pfsense-fauxapi-20200718.2.tar.gz | 7.6 kB | Without provenance | Details for pfsense-fauxapi-20200718.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pfsense_fauxapi-20200718.2-py3-none-any.whl | Python 3 | none | any | Details for pfsense_fauxapi-20200718.2-py3-none-any.whl |
Total release size: 20.1 kB
Release files / pfsense-fauxapi-20200718.2.tar.gz
| Download URL | pfsense-fauxapi-20200718.2.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e8156dc71a4b6f8672b5b0a06fbcd1dc389e17636b2d3a1995976bb3904151e
|
|
BLAKE2b-256 checksum How to use checksums |
6d82eaac6548e1f840eafa4d8ee168afc383604921c94d387caec98590deaf8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2
|
Release files / pfsense_fauxapi-20200718.2-py3-none-any.whl
| Download URL | pfsense_fauxapi-20200718.2-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7392192a1f6575dfcc75c5896da0c76076233e5e42b4bb0187201ad346e2c158
|
|
BLAKE2b-256 checksum How to use checksums |
6c6f71158f9fa24ff8a49c6202097186e446398923073f7b0abd2ef44bdfc890
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.2
|
Security for pfsense-fauxapi 20200718.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.