{ "info": { "author": "landybird", "author_email": "1442172978@qq.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# GET IPV4 or IPV6 info \n\n[![PyPI version](https://badge.fury.io/py/ip-info-all.svg)](https://pypi.org/project/ip-info-all/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\n> \u517c\u5bb9\u73af\u5883\n\n`Windows`/`Linux`/`MacOs`\n\n
\n\n### 1 \u5b89\u88c5\n\n> pip \u5b89\u88c5\n```\n$ pip install ip_info_all\n```\n\n> \u6e90\u7801\u5b89\u88c5\n```\n $ git clone https://github.com/landybird/IPInfo.git\n $ cd ip_info_all\n $ python setup.py install\n ```\n\n
\n\n### 2 \u4f7f\u7528\n\n\n1 `initial a IPInfo object` \u5b9e\u4f8b\u5316IP\u5bf9\u8c61\n\n```python\n\nip_info = IPInfo()\n```\n\n2 get `all IPV4` or `IPV6 info` -- return value is a dict \u83b7\u53d6\u6240\u6709\u7684\u4fe1\u606f\n\n```python\nip4_info_dict = ip_info.all_ipv4_ip_info_dict\n\n# {'em1': IPInfo(addr='10.0.0.206', netmask='10.0.0.206', broadcast='10.0.0.206'),\n# 'lo': IPInfo(addr='127.0.0.1', netmask='127.0.0.1', broadcast='127.0.0.1')}\n\n\nip6_info_dict = ip_info.all_ipv6_ip_info_dict\n\n...\n```\n\n3 get ip address ,netmask, broadcast info `by link encap` and `param = \"addr\" or \"netmask\" or \"broadcast\"` default is address \u6839\u636e\u8fde\u63a5\u8282\u70b9 \u83b7\u53d6\u6307\u5b9a\u7684ip\u4fe1\u606f\n\n```python\naddr, netmask, broadcast = ip_info.get_ipv4_ip_by_encap(\"lo\", param=\"all\")\n# '127.0.0.1', '127.0.0.1', '127.0.0.1'\n\naddr = ip_info.get_ipv4_ip_by_encap(\"lo\", param=\"addr\")\n# 127.0.0.1\n\n...\n\n\n```\n\n\n\n### License\n\nMIT [\u00a9landybird](https://github.com/landybird)\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/landybird/IPInfo", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ip-info-all", "package_url": "https://pypi.org/project/ip-info-all/", "platform": "", "project_url": "https://pypi.org/project/ip-info-all/", "project_urls": { "Homepage": "https://github.com/landybird/IPInfo" }, "release_url": "https://pypi.org/project/ip-info-all/0.0.5/", "requires_dist": [ "netifaces" ], "requires_python": "", "summary": "get IPV4 or IPV6 info", "version": "0.0.5" }, "last_serial": 4758925, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2de163c1040f9f84cfbc1c3ea7f95836", "sha256": "20cd4af53681c5d0c604ade887d589d11b7978cb55972bd55352c6f0f3af9cb1" }, "downloads": -1, "filename": "ip_info_all-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2de163c1040f9f84cfbc1c3ea7f95836", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3324, "upload_time": "2019-01-30T09:10:17", "url": "https://files.pythonhosted.org/packages/2a/4d/d49f79538987e7cc47be244e7cafbc24d279ef4bb40123dc491b302be963/ip_info_all-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9fd6f19cb792dc402172013b358d889", "sha256": "4837a31a0c57aaed63d3cf5ffb2da46ee8e5912f97a8440245a03bfa1769a607" }, "downloads": -1, "filename": "ip_info_all-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e9fd6f19cb792dc402172013b358d889", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2296, "upload_time": "2019-01-30T09:10:19", "url": "https://files.pythonhosted.org/packages/24/84/3b257e64f37d1cc8845589c1d04e45a75fef570cb3d2a02205e55476e8ae/ip_info_all-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "3479cfdb8d7ce50e46994063c24d9d4b", "sha256": "5737d844294fc8acc9ea109efbf6cf63da0756102e9d137797364b704c1aabca" }, "downloads": -1, "filename": "ip_info_all-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "3479cfdb8d7ce50e46994063c24d9d4b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3325, "upload_time": "2019-01-30T09:25:43", "url": "https://files.pythonhosted.org/packages/d7/b5/d3541d983e3c469c5065ac01d0d8355914192689cee147e6dcee4c6d7947/ip_info_all-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "00b9ab8abbed850a2999f418d1cfc155", "sha256": "1151cbc85172c305840dcd3259a7ae528f3f58b3fdbb942ee6978ca56e677732" }, "downloads": -1, "filename": "ip_info_all-0.0.2.tar.gz", "has_sig": false, "md5_digest": "00b9ab8abbed850a2999f418d1cfc155", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2299, "upload_time": "2019-01-30T09:25:44", "url": "https://files.pythonhosted.org/packages/34/bd/c9e9c5f573d332a301dfc503496fcf79bd0b730164f2ba4f728640679b37/ip_info_all-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "715d66d68cf20f4e0f9cf035cb02285d", "sha256": "f7fb6afd9f596dc0990232cfe1b67e75b9e9e438df67ec25a6e13358fd4ef343" }, "downloads": -1, "filename": "ip_info_all-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "715d66d68cf20f4e0f9cf035cb02285d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3407, "upload_time": "2019-01-30T09:38:35", "url": "https://files.pythonhosted.org/packages/7d/a0/7267e1b95d46797d39bf0dfc76e8920515989bf005d180efb2475f974a19/ip_info_all-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9a7dd4b60d907154d7f6ab8227ce4244", "sha256": "07c3cbfcac781e8ed4c01454bf0dc72cbd90bdf116957d9e6d439f739af2976b" }, "downloads": -1, "filename": "ip_info_all-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9a7dd4b60d907154d7f6ab8227ce4244", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2406, "upload_time": "2019-01-30T09:38:37", "url": "https://files.pythonhosted.org/packages/76/d4/5a709fd209f031fc3287f7373262821064ad132d7056c4d0386a20bb901c/ip_info_all-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "744115bbf097404597af6d02e641eb85", "sha256": "005b871747737f27eac8b3b2e1e224e54f551d897f307b3b4ab4346a701806d9" }, "downloads": -1, "filename": "ip_info_all-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "744115bbf097404597af6d02e641eb85", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3412, "upload_time": "2019-01-30T09:44:03", "url": "https://files.pythonhosted.org/packages/91/37/eeb1ab491dd85dda7ec1ba09cb3fe7c27ac64ec5ff0a0e9ec6e43b6d437f/ip_info_all-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da26365a41b4de5b82b085c4b970f38e", "sha256": "6f8c5670f14c4fb838b44c11b1845fae7722394795a48573f0f2afdb81021e68" }, "downloads": -1, "filename": "ip_info_all-0.0.4.tar.gz", "has_sig": false, "md5_digest": "da26365a41b4de5b82b085c4b970f38e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2427, "upload_time": "2019-01-30T09:44:05", "url": "https://files.pythonhosted.org/packages/af/d2/4d1c85df85205541ddda1249ae548d7cd4f6d66bf3f55de43704e8dd68aa/ip_info_all-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "51085965547cdd97208e04fae7e9061c", "sha256": "0d5c531429e83921f5d9bcf4f2024fcae5add5e5e45649cb4728f20a09ccbf35" }, "downloads": -1, "filename": "ip_info_all-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "51085965547cdd97208e04fae7e9061c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3401, "upload_time": "2019-01-30T09:47:15", "url": "https://files.pythonhosted.org/packages/2a/58/1dac153ddfbffadca920c9912d75310b441816d7a02dbeb67cf002f909af/ip_info_all-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8eca06966f7a58b51327358d78c92bba", "sha256": "2aa11f179ea3a87bea0ed0ff194dc26126c2321342068687e07b83c18ee343f3" }, "downloads": -1, "filename": "ip_info_all-0.0.5.tar.gz", "has_sig": false, "md5_digest": "8eca06966f7a58b51327358d78c92bba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2393, "upload_time": "2019-01-30T09:47:16", "url": "https://files.pythonhosted.org/packages/90/51/6939afb3a55ca7b2210aa417a4025edd375b072d18aa41497cf5ad79944c/ip_info_all-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "51085965547cdd97208e04fae7e9061c", "sha256": "0d5c531429e83921f5d9bcf4f2024fcae5add5e5e45649cb4728f20a09ccbf35" }, "downloads": -1, "filename": "ip_info_all-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "51085965547cdd97208e04fae7e9061c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3401, "upload_time": "2019-01-30T09:47:15", "url": "https://files.pythonhosted.org/packages/2a/58/1dac153ddfbffadca920c9912d75310b441816d7a02dbeb67cf002f909af/ip_info_all-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8eca06966f7a58b51327358d78c92bba", "sha256": "2aa11f179ea3a87bea0ed0ff194dc26126c2321342068687e07b83c18ee343f3" }, "downloads": -1, "filename": "ip_info_all-0.0.5.tar.gz", "has_sig": false, "md5_digest": "8eca06966f7a58b51327358d78c92bba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2393, "upload_time": "2019-01-30T09:47:16", "url": "https://files.pythonhosted.org/packages/90/51/6939afb3a55ca7b2210aa417a4025edd375b072d18aa41497cf5ad79944c/ip_info_all-0.0.5.tar.gz" } ] }