{ "info": { "author": "Nicholas de Jong", "author_email": "contact@nicholasdejong.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Topic :: System :: Networking :: Firewalls" ], "description": "# PfsenseFauxapi - Python Interface\n\nPython client for pfSense-FauxAPI - https://github.com/ndejong/pfsense_fauxapi\n\nAvailable as a PyPi package, to install, installs an API _client_ for to interact with a \npfSense host that has the FauxAPI package installed. \n```bash\npip3 install pfsense-fauxapi\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\n### Package Testing\nTests for (almost) all client-side function calls are implemented with mocked API response data\nyou can check them with pytest\n```bash\npytest -v tests\n```\n\n\n### Package Build\nShould you need/want to build the package from source\n```bash\n# obtain the source material\ngit clone https://github.com/ndejong/pfsense_fauxapi_client_python.git\ncd pfsense_fauxapi_client_python\n\n# build the package\npython3 setup.py sdist bdist_wheel\n\n# install the package from the .whl file in the dist path \npip install dist/pfsense*.whl\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ndejong/pfsense_fauxapi", "keywords": "pfsense pfsense-fauxapi devops", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "pfsense-fauxapi", "package_url": "https://pypi.org/project/pfsense-fauxapi/", "platform": "", "project_url": "https://pypi.org/project/pfsense-fauxapi/", "project_urls": { "Homepage": "https://github.com/ndejong/pfsense_fauxapi" }, "release_url": "https://pypi.org/project/pfsense-fauxapi/20190317.1/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Python client for the pfSense-FauxAPI on a pfSense host", "version": "20190317.1" }, "last_serial": 4949466, "releases": { "20190316.0": [ { "comment_text": "", "digests": { "md5": "9097d09d32c64fc2558e8725e6708b58", "sha256": "4fcc85ccf8ffe33b9efe65a28935c4641dc08b03ef46fe72f31ce907881d5075" }, "downloads": -1, "filename": "pfsense_fauxapi-20190316.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9097d09d32c64fc2558e8725e6708b58", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11852, "upload_time": "2019-03-16T15:44:39", "url": "https://files.pythonhosted.org/packages/39/0f/99db5b93243d57b94caa222403e8ae94224a670bb8275d51f12e7a36d7ba/pfsense_fauxapi-20190316.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "954959582e1a14d024e892ff60c3f03b", "sha256": "1ad82a4b9c750d8b604247ebe57c9757a78d10a841ab6e4d61c91cbe2bdaf3fb" }, "downloads": -1, "filename": "pfsense-fauxapi-20190316.0.tar.gz", "has_sig": false, "md5_digest": "954959582e1a14d024e892ff60c3f03b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5226, "upload_time": "2019-03-16T15:44:44", "url": "https://files.pythonhosted.org/packages/3c/db/1ae2b30a33e270fb8a1199a94506763e84fe4834de42760635a820879aeb/pfsense-fauxapi-20190316.0.tar.gz" } ], "20190317.0": [ { "comment_text": "", "digests": { "md5": "c32cba52e7132bdc768745018c4d7cce", "sha256": "66f60d17be5887c11b31968b40130a63c9d7d90125d73a10003feed074a9e724" }, "downloads": -1, "filename": "pfsense_fauxapi-20190317.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c32cba52e7132bdc768745018c4d7cce", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 12803, "upload_time": "2019-03-17T04:31:54", "url": "https://files.pythonhosted.org/packages/45/c8/e179a677b5e124022168697d6f2352a661ff24857f769d7b8ee6d3117d9c/pfsense_fauxapi-20190317.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ebae41b2f0c9b87bd45103e648a425f0", "sha256": "e99fb61dfb2c3fbd5d057e185b65a06a658c0740afdfda02d00f74f743d72442" }, "downloads": -1, "filename": "pfsense-fauxapi-20190317.0.tar.gz", "has_sig": false, "md5_digest": "ebae41b2f0c9b87bd45103e648a425f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6189, "upload_time": "2019-03-17T04:31:55", "url": "https://files.pythonhosted.org/packages/1f/6d/36b6c2f55b73d4700d498e0a68fd4a963ef84e84a00abe79b5877dbf749b/pfsense-fauxapi-20190317.0.tar.gz" } ], "20190317.1": [ { "comment_text": "", "digests": { "md5": "c8b156cc8cd4f4ba8e158355c4b55629", "sha256": "140ac2c36cbcfcc3acf47e7d075328d2b2e806b19b05dc2c521e47637432ac7e" }, "downloads": -1, "filename": "pfsense_fauxapi-20190317.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c8b156cc8cd4f4ba8e158355c4b55629", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13987, "upload_time": "2019-03-17T04:36:55", "url": "https://files.pythonhosted.org/packages/74/55/9ad607fcaf57082b07065e95567db10a4bb1cd79d6553f86e904b310d012/pfsense_fauxapi-20190317.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cf12313f4064f9525de6a83a6548e9f6", "sha256": "b3dad9587c0ac9d9a423e114fba03f639354f4232ce3bf7df5477dc78e078b98" }, "downloads": -1, "filename": "pfsense-fauxapi-20190317.1.tar.gz", "has_sig": false, "md5_digest": "cf12313f4064f9525de6a83a6548e9f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6605, "upload_time": "2019-03-17T04:36:57", "url": "https://files.pythonhosted.org/packages/a8/1f/2664dd013727d54351dd887c61db7783cbfa8f04c7173e286cbcd91d2b75/pfsense-fauxapi-20190317.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8b156cc8cd4f4ba8e158355c4b55629", "sha256": "140ac2c36cbcfcc3acf47e7d075328d2b2e806b19b05dc2c521e47637432ac7e" }, "downloads": -1, "filename": "pfsense_fauxapi-20190317.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c8b156cc8cd4f4ba8e158355c4b55629", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13987, "upload_time": "2019-03-17T04:36:55", "url": "https://files.pythonhosted.org/packages/74/55/9ad607fcaf57082b07065e95567db10a4bb1cd79d6553f86e904b310d012/pfsense_fauxapi-20190317.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cf12313f4064f9525de6a83a6548e9f6", "sha256": "b3dad9587c0ac9d9a423e114fba03f639354f4232ce3bf7df5477dc78e078b98" }, "downloads": -1, "filename": "pfsense-fauxapi-20190317.1.tar.gz", "has_sig": false, "md5_digest": "cf12313f4064f9525de6a83a6548e9f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6605, "upload_time": "2019-03-17T04:36:57", "url": "https://files.pythonhosted.org/packages/a8/1f/2664dd013727d54351dd887c61db7783cbfa8f04c7173e286cbcd91d2b75/pfsense-fauxapi-20190317.1.tar.gz" } ] }