{ "info": { "author": "Pranav Gajjewar", "author_email": "apbetahouse45@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "## IP Address Library:\n\nThis is the work I did when working on TCP/IP assignments. Particularly the ones dealing with IP addresses and subnets.\nThis library contains an easy and convenient, albeit not the most efficient, implementation of IP address operations.\n\n### Note :\n\nI made the library more for educational and academic reasons than for any actual use. And as such, I'm open sourcing it with the intention that someone else may find it useful while learning IP addresses.\n\n### Dependencies :\n\n1. Python 3 runtime environment.\n\n### Usage :\n\nThere are two main classes that can be used to compute IP address operations. \n1. IPConv\n2. Subnet\n\nTo import the library use-\n```\nfrom ipconv.ipconv import IPConv, Subnet\n```\n\n#### IPConv:\n\nThis class is used for all operations related to IP addresses.\n\n* An object can be instantiated by passing the IP address in one of these forms- \n```dotted-decimal, binary, hexadecimal or CIDR notation```\n\n```ip = IPConv('127.0.0.1/8')``` \n\n* Once the object has been created, you can convert this into any alternate notation by-\n```\nip.hexadecimal() # 7F:00:00:01\nip.dotted_decimal() # 127.0.0.1\nip.binary() # 01111111000000000000000000000001\n```\n\n* You can print all relevant info regarding the IP address by doing-\n```\nip.desc()\n\nDotted-Decimal : 127.0.0.1\nBinary : 01111111000000000000000000000001\nHexadecimal : 7F:00:00:01\n\nClassful Addressing Scheme:\nClass : A\nNetwork mask : 8\nRange : 16777216\nNetwork address : 127.0.0.0\nBroadcast address : 127.255.255.255\n\nClassless Addressing Scheme:\nNetwork mask : 8\nRange : 16777216\nNetwork address : 127.0.0.0\nBroadcast address : 127.255.255.255\n```\n\n* You can also get the next or prev IP address from the original address as follows-\n```\nfor i in ip.next(5):\n\tprint(i)\n\nfor i in ip.prev(5):\n\tprint(i)\n```\n\n#### Subnet:\n\nThis class is used for working with subnets. Note that this implementation is for classless IP addressing. But since classful IP addressing can be considered as a special case of classless, it is compatible with both of them. You just need to give correct mask.\n\n* Initalizing a Subnet object requires two things- IP address in CIDR notation and number of subnets you want.\n```\nsnet = Subnet('127.0.0.1/8', 8)\n```\n\n* You can get a table of all the IP ranges by doing-\n```\nsnet.desc()\n\n+===================================================================+\n|Index |First Address |Last Address |Range |\n+===================================================================+\n|1 |127.0.0.0 |127.31.255.255 |2097152 |\n---------------------------------------------------------------------\n|2 |127.32.0.0 |127.63.255.255 |2097152 |\n---------------------------------------------------------------------\n|3 |127.64.0.0 |127.95.255.255 |2097152 |\n---------------------------------------------------------------------\n|4 |127.96.0.0 |127.127.255.255 |2097152 |\n---------------------------------------------------------------------\n|5 |127.128.0.0 |127.159.255.255 |2097152 |\n---------------------------------------------------------------------\n|6 |127.160.0.0 |127.191.255.255 |2097152 |\n---------------------------------------------------------------------\n|7 |127.192.0.0 |127.223.255.255 |2097152 |\n---------------------------------------------------------------------\n|8 |127.224.0.0 |127.255.255.255 |2097152 |\n---------------------------------------------------------------------\n```\n\n* You can get the first or last subnets by-\n```\nfor i in snet.first(5):\n print(i)\n\nfor i in snet.last(5):\n\tprint(i)\n```\n\n* To get the subnet from any IP address\n```\nsnet.get_subnet('127.34.78.25')\n\n\n```\n\n### License :\n\nThis project is licensed under the terms of the MIT license.\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/Cartmanishere/IPLib", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ipconv", "package_url": "https://pypi.org/project/ipconv/", "platform": "", "project_url": "https://pypi.org/project/ipconv/", "project_urls": { "Homepage": "https://github.com/Cartmanishere/IPLib" }, "release_url": "https://pypi.org/project/ipconv/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "An easy and convenient IP address operation library", "version": "0.0.4" }, "last_serial": 4074415, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "f9a62fec37aa9c244d10fd1e2ae09513", "sha256": "15500bd5252fb0c8406ec3a5f9d9a84e85f61f6f0283eef14e6455fcb55017ca" }, "downloads": -1, "filename": "ipconv-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "f9a62fec37aa9c244d10fd1e2ae09513", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6423, "upload_time": "2018-07-17T15:35:10", "url": "https://files.pythonhosted.org/packages/56/e4/49eb10265e131ed666c31973e5002c709854a68802222df0f1b1a6a033e4/ipconv-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "77b2870d68651dcd1096e9f59cac133f", "sha256": "286669a18bb3a331cbb91831d8cb022b5d442f77c012dbb3caf7198eff385714" }, "downloads": -1, "filename": "ipconv-0.0.2.tar.gz", "has_sig": false, "md5_digest": "77b2870d68651dcd1096e9f59cac133f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6233, "upload_time": "2018-07-17T15:35:12", "url": "https://files.pythonhosted.org/packages/d0/9a/5cec03cec59679a6d04809cab7b54b15b1a665ee4581bb8f0a8f214e2447/ipconv-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "2228b421ddc3b06a0a1cc31d81dfce8f", "sha256": "09f1a75eb66fb92692152c0eb93449c5f64d27f00fcb2c8ccfd1b2268e4e4337" }, "downloads": -1, "filename": "ipconv-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "2228b421ddc3b06a0a1cc31d81dfce8f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6469, "upload_time": "2018-07-17T16:00:53", "url": "https://files.pythonhosted.org/packages/ba/15/0db6111ae5e77ed1326abaa92f84cbce2b7595f6653d922d5e8e719bc86a/ipconv-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e53e07bbced6f3f7890af13415e3b7e8", "sha256": "5533a035685326b7be2e4bd3bd3497e43f531d6bba37001a3eccfec9d200bdd2" }, "downloads": -1, "filename": "ipconv-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e53e07bbced6f3f7890af13415e3b7e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6270, "upload_time": "2018-07-17T16:00:56", "url": "https://files.pythonhosted.org/packages/c7/28/3cb2eb3b93bcd0121ba6bf577e3bb0ee4098b713afadc204706b0ae24e79/ipconv-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "39d1bd79170a571570abf79abd7e1a93", "sha256": "a2298ef90cce29c1ca07fe9f05287ab9e0fce2b77b85d6cf5568421c9c1c694f" }, "downloads": -1, "filename": "ipconv-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "39d1bd79170a571570abf79abd7e1a93", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6556, "upload_time": "2018-07-17T16:11:56", "url": "https://files.pythonhosted.org/packages/d6/fb/ed275766d9d1ff357386a27e9ad27c75e793d1458188746770fb78ffb194/ipconv-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a54259b655391f03bfd60cc3ff9d3b4", "sha256": "a55ae3b29e6646f73ca00e25622390a503764a13f340278a49f5f9af2d0ff5f5" }, "downloads": -1, "filename": "ipconv-0.0.4.tar.gz", "has_sig": false, "md5_digest": "3a54259b655391f03bfd60cc3ff9d3b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6383, "upload_time": "2018-07-17T16:12:01", "url": "https://files.pythonhosted.org/packages/67/b2/b381148b3fa509719e2f63d56423c790a1b3298ef1a9f6c9da380fad1eb1/ipconv-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "39d1bd79170a571570abf79abd7e1a93", "sha256": "a2298ef90cce29c1ca07fe9f05287ab9e0fce2b77b85d6cf5568421c9c1c694f" }, "downloads": -1, "filename": "ipconv-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "39d1bd79170a571570abf79abd7e1a93", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6556, "upload_time": "2018-07-17T16:11:56", "url": "https://files.pythonhosted.org/packages/d6/fb/ed275766d9d1ff357386a27e9ad27c75e793d1458188746770fb78ffb194/ipconv-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a54259b655391f03bfd60cc3ff9d3b4", "sha256": "a55ae3b29e6646f73ca00e25622390a503764a13f340278a49f5f9af2d0ff5f5" }, "downloads": -1, "filename": "ipconv-0.0.4.tar.gz", "has_sig": false, "md5_digest": "3a54259b655391f03bfd60cc3ff9d3b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6383, "upload_time": "2018-07-17T16:12:01", "url": "https://files.pythonhosted.org/packages/67/b2/b381148b3fa509719e2f63d56423c790a1b3298ef1a9f6c9da380fad1eb1/ipconv-0.0.4.tar.gz" } ] }