{ "info": { "author": "Will McLendon", "author_email": "wimclend@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8" ], "description": "# fortigaterepr\n\nNOTE: This should be considered ALPHA!\n\nBuilt off of Fortinet's fortiosapi library to provide an abstraction and representation of various operational state data of a Fortigate Device. Currently most operational data is modeled in a sub-classed Pandas Dataframe, and the Dataframe itself can be manipulated like any other Dataframe for manipulation of the output. Has some helper methods that more or less wrap some of the methods in the fortiosapi library -- most (all?) of the parameters that library accepts are passed through from the FortigateDevice Class, with the same defaults. The data is sub-classed to allow for some helper methods to clean up the data and also to provide some canned output filtering options like removing certain often-unnecessary columns from printouts, etc.\n\nTo gather data from the device, use one of the 'get' methods available such as `get_interfaces()`. This returns the result and also stores the result as a property of the class instance - i.e. `dev.interfaces`\n\nIn general all of the data returned from the device API is stored in the DataFrame, though there is some data cleanup that can occur (i.e. converting epoch timestamp to readable date/time, replacing NaNs with \"None\" or \"N/A\", etc.). Often the number of columns is quite large, and much of the data is not useful most of the time, so each DataFrame has a `get()` method that will return a copy of the DataFrame with certain columns removed (depends upon the table). If the full DataFrame is needed, you can just reference the appropriate class instance property - i.e. `dev.interfaces`\n\n## Basic Use\n\nSimple example usage:\n\n```python\nfrom fortigaterepr.fortigaterepr import FortigateDevice\ndev = FortigateDevice(\n \"192.0.2.50\",\n username=\"username\",\n password=\"password\",\n apitoken=\"secretapitoken,\n verify=False,\n)\n\nif not dev.restapilogin():\n print(\"Error authenticating to API - exiting!\")\n sys.exit(1)\n\ninterface_data = dev.get_interfaces()\n\n# print entire interface_data DataFrame:\nprint(interface_data)\n\n# print a generally more useful subset:\nprint(interface_data.get())\n```\n\n## TODO\n\n* Unit Tests\n* more state data gathering / representation\n * Address Book Objects\n * format Facts Dictionary into simple DataFrame\n * how to add route table size? as own dataframe, or somehow as part of Route Table DataFrame?\n* methods for other output formats -- i.e. a `to_html()` or `to_json()` method that takes all the stored data and writes it to HTML or JSON stdout or to a file.\n* other?\n\n\n=======\nHistory\n=======\n\n0.1.0 (2019-10-20)\n------------------\n\n* First release on PyPI.\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/wmclendon/fortigaterepr", "keywords": "fortigaterepr", "license": "Apache Software License 2.0", "maintainer": "", "maintainer_email": "", "name": "fortigaterepr", "package_url": "https://pypi.org/project/fortigaterepr/", "platform": "", "project_url": "https://pypi.org/project/fortigaterepr/", "project_urls": { "Homepage": "https://github.com/wmclendon/fortigaterepr" }, "release_url": "https://pypi.org/project/fortigaterepr/0.1.0/", "requires_dist": [ "fortiosapi", "pandas", "textfsm" ], "requires_python": "", "summary": "Library to interact with and create representation of operational state data of a Fortigate device.", "version": "0.1.0" }, "last_serial": 6002948, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7cf8f5fadbb0bddf0739292ff40c6a89", "sha256": "49e12ace6fc16d29969f5b6bf0a7a9aca2a02d79adcc9c3a40480ded9b11e798" }, "downloads": -1, "filename": "fortigaterepr-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7cf8f5fadbb0bddf0739292ff40c6a89", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11329, "upload_time": "2019-10-20T14:06:47", "url": "https://files.pythonhosted.org/packages/97/10/8dc6e819ac96f0bf3dc12c8b6e8bb14322138d20400d283566b2d77a0a5f/fortigaterepr-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50f227822f1a8b823e53e3d142eaedab", "sha256": "66ae5777ee44d487534db3ac316d06f19287c27848b3ceb2a2e43782e52214d7" }, "downloads": -1, "filename": "fortigaterepr-0.1.0.tar.gz", "has_sig": false, "md5_digest": "50f227822f1a8b823e53e3d142eaedab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22034, "upload_time": "2019-10-20T14:06:49", "url": "https://files.pythonhosted.org/packages/d2/81/927e048332e84a49c9e66d18285a56de6b70202ecd379a86f30f06cac4f4/fortigaterepr-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7cf8f5fadbb0bddf0739292ff40c6a89", "sha256": "49e12ace6fc16d29969f5b6bf0a7a9aca2a02d79adcc9c3a40480ded9b11e798" }, "downloads": -1, "filename": "fortigaterepr-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7cf8f5fadbb0bddf0739292ff40c6a89", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11329, "upload_time": "2019-10-20T14:06:47", "url": "https://files.pythonhosted.org/packages/97/10/8dc6e819ac96f0bf3dc12c8b6e8bb14322138d20400d283566b2d77a0a5f/fortigaterepr-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50f227822f1a8b823e53e3d142eaedab", "sha256": "66ae5777ee44d487534db3ac316d06f19287c27848b3ceb2a2e43782e52214d7" }, "downloads": -1, "filename": "fortigaterepr-0.1.0.tar.gz", "has_sig": false, "md5_digest": "50f227822f1a8b823e53e3d142eaedab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22034, "upload_time": "2019-10-20T14:06:49", "url": "https://files.pythonhosted.org/packages/d2/81/927e048332e84a49c9e66d18285a56de6b70202ecd379a86f30f06cac4f4/fortigaterepr-0.1.0.tar.gz" } ] }