{"id":23165924,"url":"https://github.com/ndejong/pfsense_fauxapi_client_python","last_synced_at":"2025-08-20T08:11:19.926Z","repository":{"id":143026065,"uuid":"175929919","full_name":"ndejong/pfsense_fauxapi_client_python","owner":"ndejong","description":"Python client for pfSense-FauxAPI","archived":false,"fork":false,"pushed_at":"2024-06-18T23:24:34.000Z","size":34,"stargazers_count":13,"open_issues_count":6,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-19T06:33:52.036Z","etag":null,"topics":["pfsense","pfsense-fauxapi"],"latest_commit_sha":null,"homepage":"https://github.com/ndejong/pfsense_fauxapi","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ndejong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-16T05:21:51.000Z","updated_at":"2022-11-01T17:00:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"45b1affe-9bd1-446d-a2af-acbec76ef2e4","html_url":"https://github.com/ndejong/pfsense_fauxapi_client_python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2Fpfsense_fauxapi_client_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2Fpfsense_fauxapi_client_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2Fpfsense_fauxapi_client_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndejong%2Fpfsense_fauxapi_client_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndejong","download_url":"https://codeload.github.com/ndejong/pfsense_fauxapi_client_python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230204034,"owners_count":18189712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pfsense","pfsense-fauxapi"],"created_at":"2024-12-18T01:29:59.855Z","updated_at":"2024-12-18T01:30:00.482Z","avatar_url":"https://github.com/ndejong.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PfsenseFauxapi - Python Interface\n\n[![PyPi](https://img.shields.io/pypi/v/pfsense-fauxapi.svg)](https://pypi.org/project/pfsense-fauxapi/)\n[![Build Status](https://travis-ci.org/ndejong/pfsense_fauxapi_client_python.svg?branch=master)](https://travis-ci.org/ndejong/pfsense_fauxapi_client_python)\n\nPython client for pfSense-FauxAPI - https://github.com/ndejong/pfsense_fauxapi\n\n## Install\n#### via PyPi\n```bash\npip3 install pfsense-fauxapi\n```\n\n#### Install via Source\n```bash\n# obtain the source material\ngit clone https://github.com/ndejong/pfsense_fauxapi_client_python.git\ncd pfsense_fauxapi_client_python\npython3 -m venv venv\nsource venv/bin/activate\npip3 install -r requirements.txt\npython3 setup.py clean\npython3 setup.py test\npython3 setup.py install\n```\n\n## Code Examples\nThree Python code samples are provided that demonstrate interface usage\n\n* `function-iterate.py` - iterates (almost) all the FauxAPI functions to confirm operation.  \n* `update-aws-aliases.py` - downloads the latest AWS `ip-ranges.json` and populates the pfsense alias table(s).\n* `usergroup-management.py` - demonstrates the ability to manage users and groups programmatically. \n\n\n## Command Line\nAdditionally this pip-package provides a command-line interface to work with FauxAPI\n```bash\nusage: fauxapi [-h] [--host [host]] [--apikey [key]] [--apisecret [secret]]\n               [--verified-ssl] [--debug]\n               [function] [[function] ...] [[function-args]]\n\nFauxAPI\n\noptional arguments:\n  -h, --help            show this help message and exit\n\nCall:\n  --host [host]         Host address of the target pfSense host with the\n                        PfsenseFauxapi package installed.\n  --apikey [key]        FauxAPI apikey value - alternatively via the\n                        FAUXAPI_APIKEY environment variable.\n  --apisecret [secret]  FauxAPI apisecret value - alternatively via the\n                        FAUXAPI_APIKEY environment variable.\n  --verified-ssl        Enable SSL certificate checks - default does NOT check\n                        SSL certificates.\n  --debug               Enable debug response from the remote FauxAPI -\n                        helpful in tracking down issues.\n  [function]            The FauxAPI function being called\n  [function-args]       Arguments to the function, space separated\n```\n\nCommand line example, using environment variables to pass the `FAUXAPI_APIKEY` \nand `FAUXAPI_APIKEY` credentials.\n```bash\n$ fauxapi --host 192.168.1.200 gateway_status | jq .\n{\n  \"callid\": \"5c8d0f7361cba\",\n  \"action\": \"gateway_status\",\n  \"message\": \"ok\",\n  \"data\": {\n    \"gateway_status\": {\n      \"10.11.12.1\": {\n        \"monitorip\": \"10.10.10.1\",\n        \"srcip\": \"10.10.10.200\",\n        \"name\": \"WAN_DHCP\",\n        \"delay\": \"0.422ms\",\n        \"stddev\": \"0.073ms\",\n        \"loss\": \"0.0%\",\n        \"status\": \"none\"\n      }\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndejong%2Fpfsense_fauxapi_client_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndejong%2Fpfsense_fauxapi_client_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndejong%2Fpfsense_fauxapi_client_python/lists"}