{ "info": { "author": "Jamison Emilio & Todd Albiston", "author_email": "foxtrot711@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2" ], "description": "# Jamaddr27 Python Package\r\n\r\nThis package Created by Jamison Emilio and packaged by Todd Albiston\r\n\r\n## Installation Python2.7.12 and above\r\n```markdown\r\npip install jamaddr27 \r\n```\r\nfor python3.6 see jamaddr https://github.com/talbiston/jamaddr\r\n\r\n## Description:\r\nPython Package adds functions to convert IP address or subnet masks to bits and bits back to IP address.\r\n\r\n```python\r\nfrom jamaddr27 import JamAddr\r\nipbits = JamAddr.ip_to_bits(\"192.168.0.23\")\r\nipbits\r\n\r\nreturns = '11000000101010000000000000010111'\r\n```\r\n\r\n```python\r\nfrom jamaddr27 import JamAddr\r\nbitsip = JamAddr.bits_to_ip(\"11000000101010000000000000010111\")\r\nbitsip\r\n\r\nreturns = '192.168.0.23'\r\n```\r\n\r\nOf course you could also enter a subnet mask to convert to bits then do the same with its corresponding IP, then\r\nwork out what the network ID or Broadcast IPs would be or use your imagination on what other use cases could be.\r\n\r\n```python\r\nfrom jamaddr27 import JamAddr\r\n\r\ndef network_id(ip_cidr):\r\n\r\n ip, cidr = ip_cidr.split('/')\r\n ip_bits = JamAddr.ip_to_bits(ip)[:int(cidr)] + '0' * (32 - int(cidr))\r\n return '{}/{}'.format(JamAddr.bits_to_ip(ip_bits), cidr)\r\n\r\nnetworkID = network_id(\"192.168.0.23/28\")\r\nprint(networkID)\r\n\r\nreturns = 192.168.0.16/28\r\n```\r\n\r\nThis example above is already included as a function in this package so you could just do the following, but you get the point. \r\n\r\n```python\r\nfrom jamaddr27 import JamAddr\r\n\r\nnetworkID = JamAddr.network_id(\"192.168.0.23/28\")\r\nprint(networkID)\r\n\r\nreturns = 192.168.0.16/28\r\n```\r\n\r\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/talbiston/jamaddr27.git", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "jamaddr27", "package_url": "https://pypi.org/project/jamaddr27/", "platform": "", "project_url": "https://pypi.org/project/jamaddr27/", "project_urls": { "Homepage": "https://github.com/talbiston/jamaddr27.git" }, "release_url": "https://pypi.org/project/jamaddr27/0.5/", "requires_dist": null, "requires_python": "", "summary": "IP Subnet package", "version": "0.5" }, "last_serial": 3919059, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "417b0073d9402847c72efc4e32d46562", "sha256": "eac8bc19060931be2d0a74f4b4589c9a3f404ad4cd01eeecf5649e885e2ba073" }, "downloads": -1, "filename": "jamaddr27-0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "417b0073d9402847c72efc4e32d46562", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 2378, "upload_time": "2018-05-31T23:05:58", "url": "https://files.pythonhosted.org/packages/e3/8c/3fba43ebd5c57fd659501d51cef1b51d731e1575894ecb40c506946723e8/jamaddr27-0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3955be01642426e31e2316ae1dfd951f", "sha256": "3d9f506e93255891a1d21020f4571b04ab2d27d49d5f6fb5b2890e689db61823" }, "downloads": -1, "filename": "jamaddr27-0.2.zip", "has_sig": false, "md5_digest": "3955be01642426e31e2316ae1dfd951f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3252, "upload_time": "2018-05-31T23:06:00", "url": "https://files.pythonhosted.org/packages/c0/81/90e9943af5a48b06ac36557db7fc0fa854f1bda0baa51dc15629791a1f46/jamaddr27-0.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "b9d5ca67e4b7ae258d06c88fc296ba98", "sha256": "c97cd9ca9f4fe62d603facf7d12f5d5606d21cee413ef449a6c5ad09e727579e" }, "downloads": -1, "filename": "jamaddr27-0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "b9d5ca67e4b7ae258d06c88fc296ba98", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 2602, "upload_time": "2018-05-31T23:26:41", "url": "https://files.pythonhosted.org/packages/f2/25/b90dbf9ac77d87f25bcb6a826f93d7bf33dd25d34d298acc6007304109ee/jamaddr27-0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "216a9664416b5d6581ac0f530203091c", "sha256": "102eb56b7cd2d8420ba81ad5d97fbb38053346588769dd6b3b6b16fd7098a19b" }, "downloads": -1, "filename": "jamaddr27-0.3.tar.gz", "has_sig": false, "md5_digest": "216a9664416b5d6581ac0f530203091c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2129, "upload_time": "2018-05-31T23:26:42", "url": "https://files.pythonhosted.org/packages/39/bc/4537506f035bc4fb2f8c64cb0a0e2daa23383434f4453f42fc05b9ae55ff/jamaddr27-0.3.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "1c9611cee96b711f863e3b91ae1d9b0d", "sha256": "9d3ccc93dac799af89d6d0b10d4c9e27026406ee9a3658e036521d2f9f1e31e2" }, "downloads": -1, "filename": "jamaddr27-0.4.0-py2-none-any.whl", "has_sig": false, "md5_digest": "1c9611cee96b711f863e3b91ae1d9b0d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 2990, "upload_time": "2018-06-01T00:38:42", "url": "https://files.pythonhosted.org/packages/ea/69/58f91c1e223d409c7babf2224a75ea881b759408aab755317d4a18f84e5c/jamaddr27-0.4.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "65199b6f4dfd734c5f18f38bb2a73a98", "sha256": "159d7168eb847fec961e502bfe7653c2378cebc8d59ad10987dc52e338190db4" }, "downloads": -1, "filename": "jamaddr27-0.4.0.tar.gz", "has_sig": false, "md5_digest": "65199b6f4dfd734c5f18f38bb2a73a98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2496, "upload_time": "2018-06-01T00:38:43", "url": "https://files.pythonhosted.org/packages/c2/c3/ac9c51b766283652dd8eda55b53399c36e6554f4646502ab9ae2afdc3715/jamaddr27-0.4.0.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "f343bba201c6ec0e0f34f2e81963f95c", "sha256": "3f20957c7c88ba782de5a89e9054cff87beec882f293a1c855a4d603cdf266f6" }, "downloads": -1, "filename": "jamaddr27-0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "f343bba201c6ec0e0f34f2e81963f95c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 2973, "upload_time": "2018-06-01T00:41:33", "url": "https://files.pythonhosted.org/packages/ed/b4/42fde6dfb1cf69ce2f69cf23a01fe43cdacb7a0b12025d33abce4b1dc6f5/jamaddr27-0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "509d7ea91e3fdcc5856e3c83293fd87f", "sha256": "857e232a45ed5b926d4d4cac01b96da457d1889f0a0669d5e37f7e9e76e31f91" }, "downloads": -1, "filename": "jamaddr27-0.5.tar.gz", "has_sig": false, "md5_digest": "509d7ea91e3fdcc5856e3c83293fd87f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2489, "upload_time": "2018-06-01T00:41:34", "url": "https://files.pythonhosted.org/packages/f2/31/a0ba32e3817fac21319aebadb405db770169404e0300f9879c377fbe0afa/jamaddr27-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f343bba201c6ec0e0f34f2e81963f95c", "sha256": "3f20957c7c88ba782de5a89e9054cff87beec882f293a1c855a4d603cdf266f6" }, "downloads": -1, "filename": "jamaddr27-0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "f343bba201c6ec0e0f34f2e81963f95c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 2973, "upload_time": "2018-06-01T00:41:33", "url": "https://files.pythonhosted.org/packages/ed/b4/42fde6dfb1cf69ce2f69cf23a01fe43cdacb7a0b12025d33abce4b1dc6f5/jamaddr27-0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "509d7ea91e3fdcc5856e3c83293fd87f", "sha256": "857e232a45ed5b926d4d4cac01b96da457d1889f0a0669d5e37f7e9e76e31f91" }, "downloads": -1, "filename": "jamaddr27-0.5.tar.gz", "has_sig": false, "md5_digest": "509d7ea91e3fdcc5856e3c83293fd87f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2489, "upload_time": "2018-06-01T00:41:34", "url": "https://files.pythonhosted.org/packages/f2/31/a0ba32e3817fac21319aebadb405db770169404e0300f9879c377fbe0afa/jamaddr27-0.5.tar.gz" } ] }