{ "info": { "author": "Aleksandr Balezin", "author_email": "gescheit12@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3 :: Only", "Topic :: System :: Networking :: Monitoring" ], "description": "# fastsnmp\nSNMP poller oriented to poll bunch of hosts in short time. Package include poller and SNMP coder/encoder library.\n\n[Reference manual] (http://fastsnmp.readthedocs.org/)\n\nExample:\n```python\nfrom fastsnmp import snmp_poller\n\nhosts = (\"127.0.0.1\",)\n# oids in group must be with same indexes\noid_group = {\"1.3.6.1.2.1.2.2.1.2\": \"ifDescr\",\n \"1.3.6.1.2.1.2.2.1.10\": \"ifInOctets\",\n }\n\ncommunity = \"public\"\nsnmp_data = snmp_poller.poller(hosts, [list(oid_group)], community)\nfor d in snmp_data:\n print (\"host=%s oid=%s.%s value=%s\" % (d[0], oid_group[d[1]], d[2], d[3]))\n```\nOutput:\n```\nhost=127.0.0.1 oid=ifInOctets.1 value=243203744\nhost=127.0.0.1 oid=ifDescr.1 value=b'lo'\nhost=127.0.0.1 oid=ifInOctets.2 value=1397428486\nhost=127.0.0.1 oid=ifDescr.2 value=b'eth0'\n```\nType conversion:\n\n| SNMP | Python |\n| --- | --- |\n| octetstring, ipaddress | bytes |\n| null, unknown specific | None |\n| objectid | str |\n| counter32, unsigned32, gauge32, counter64, integer | int |\n\nNotices:\n\n- ipaddress can be converted to string using ``str(ipaddress.IPv4Address(b\"\\x01\\x01\\x01\\x01\"))`` or ``socket.inet_ntoa(b\"\\x01\\x01\\x01\\x01\")``\n\nAnother python SNMP libraries:\n\n* [PySNMP](http://pysnmp.sourceforge.net/) - very good SNMP library\n* [libsnmp](https://pypi.python.org/pypi/libsnmp) - SNMP coder/decoder (abandoned project)\n* [Bindings to Net-SNMP](http://net-snmp.sourceforge.net/wiki/index.php/Python_Bindings)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gescheit/fastsnmp", "keywords": "SNMP poller parser library coder decoder", "license": "GPLv2", "maintainer": "", "maintainer_email": "", "name": "fastsnmp", "package_url": "https://pypi.org/project/fastsnmp/", "platform": "Linux", "project_url": "https://pypi.org/project/fastsnmp/", "project_urls": { "Homepage": "https://github.com/gescheit/fastsnmp" }, "release_url": "https://pypi.org/project/fastsnmp/0.4/", "requires_dist": null, "requires_python": "", "summary": "SNMP poller oriented to poll bunch of hosts in short time. Package include poller and SNMP library", "version": "0.4" }, "last_serial": 5207553, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "f2d34c5740e8cdf9854087fd73fab7e9", "sha256": "47af94175bb72f53af7bc4508b783486904452f78347809401a50e8a294514df" }, "downloads": -1, "filename": "fastsnmp-0.3.tar.gz", "has_sig": false, "md5_digest": "f2d34c5740e8cdf9854087fd73fab7e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 104706, "upload_time": "2019-04-22T15:57:30", "url": "https://files.pythonhosted.org/packages/8b/00/36da18d720a7eee1f54f852179c86ddcc6d4d4c75e17f9918582c20cf3e7/fastsnmp-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "0d676f8351217cd19024df8eb0692f5d", "sha256": "7b03420d02a04fc9edf8d705bf5325515e5688c976c4b3fa22c747b41a9ac60e" }, "downloads": -1, "filename": "fastsnmp-0.4.tar.gz", "has_sig": false, "md5_digest": "0d676f8351217cd19024df8eb0692f5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 103311, "upload_time": "2019-04-30T10:16:55", "url": "https://files.pythonhosted.org/packages/3c/8c/41b1ab5b61608701dce4e1f019ccbe60c49f0e19001a51ce48642c52b60d/fastsnmp-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d676f8351217cd19024df8eb0692f5d", "sha256": "7b03420d02a04fc9edf8d705bf5325515e5688c976c4b3fa22c747b41a9ac60e" }, "downloads": -1, "filename": "fastsnmp-0.4.tar.gz", "has_sig": false, "md5_digest": "0d676f8351217cd19024df8eb0692f5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 103311, "upload_time": "2019-04-30T10:16:55", "url": "https://files.pythonhosted.org/packages/3c/8c/41b1ab5b61608701dce4e1f019ccbe60c49f0e19001a51ce48642c52b60d/fastsnmp-0.4.tar.gz" } ] }