{ "info": { "author": "Samuel Meuli", "author_email": "dev@samuelmeuli.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# anonymize_ip\n\nThis is a simple Python library for anonymizing IP addresses. Both IPv4 and IPv6 addresses are supported.\n\nExamples:\n\n* IPv4: `95.239.169.11` \u2192 `95.239.169.0`\n* IPv6: `5219:3a94:fdc5:19e1:70a3:b2c4:40ef:ae03` \u2192 `5219:3a94:fdc5:19e1::`\n\n\n## Usage\n\n```\npip install anonymizeip\n```\n\n```py\nfrom anonymizeip import anonymize_ip\n\naddress = \"fe80::0202:b3ff:fe1e:8329\"\nanonymized = anonymize_ip(address)\nprint(anonymized)\n\n# Prints \"fe80::\"\n```\n\n\n## Settings\n\nThe number of address blocks that are set to 0 can be customized.\n\nBesides the IP address, the function `anonymize_ip` takes two optional parameters:\n\n```py\nanonymize_ip(\n address,\n ipv4_mask=\"...\",\n ipv6_mask=\"...\"\n)\n```\n\n* `ipv4_mask`: Defaults to `255.255.255.0`, i.e. the last octet will be anonymized (set to 0)\n* `ipv6_mask`: Defaults to `ffff:ffff:ffff:ffff::` (same as `ffff:ffff:ffff:ffff:0:0:0:0`), i.e. the last four blocks will be anonymized (set to 0)\n\n\n## Development\n\n1. `git clone`\n2. `pipenv install --dev`\n3. Make your code modifications\n4. `pipenv run test`\n5. `pipenv run lint`\n\nContributions are always welcome. Please first discuss changes via issue before submitting a pull request.\n\n\n## Credits\n\nThe implementation of this library was strongly inspired by [php-ip-anonymizer](https://github.com/geertw/php-ip-anonymizer) by Geert Wirken.\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/samuelmeuli/anonymize-ip", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "anonymizeip", "package_url": "https://pypi.org/project/anonymizeip/", "platform": "", "project_url": "https://pypi.org/project/anonymizeip/", "project_urls": { "Homepage": "https://github.com/samuelmeuli/anonymize-ip" }, "release_url": "https://pypi.org/project/anonymizeip/1.0.0/", "requires_dist": null, "requires_python": ">=3.3.0", "summary": "Python library for anonymizing IP addresses", "version": "1.0.0" }, "last_serial": 4207001, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "a2c39bb478df8ad2752d99dbed7b59d7", "sha256": "e0d446b06b2bbf236394a90b971de403f90f805d14db3a405f8731716acad1fe" }, "downloads": -1, "filename": "anonymizeip-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a2c39bb478df8ad2752d99dbed7b59d7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.3.0", "size": 3441, "upload_time": "2018-08-25T18:51:08", "url": "https://files.pythonhosted.org/packages/e2/74/27c04c380b9e5d40de1643677f07b54bda2733b33cabba809214405a737e/anonymizeip-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "063eb7d8e567b622285697b5e9ba2b9d", "sha256": "491cb94a31bae23294c5b93a13dd5c9ed55be98003c622e76e2fe64d6a4f3e91" }, "downloads": -1, "filename": "anonymizeip-1.0.0.tar.gz", "has_sig": false, "md5_digest": "063eb7d8e567b622285697b5e9ba2b9d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3.0", "size": 4297, "upload_time": "2018-08-25T18:51:09", "url": "https://files.pythonhosted.org/packages/4a/05/5987ce97a2a8debfba16e35efa88975f340559337b7faabb24e78b32f8c6/anonymizeip-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a2c39bb478df8ad2752d99dbed7b59d7", "sha256": "e0d446b06b2bbf236394a90b971de403f90f805d14db3a405f8731716acad1fe" }, "downloads": -1, "filename": "anonymizeip-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a2c39bb478df8ad2752d99dbed7b59d7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.3.0", "size": 3441, "upload_time": "2018-08-25T18:51:08", "url": "https://files.pythonhosted.org/packages/e2/74/27c04c380b9e5d40de1643677f07b54bda2733b33cabba809214405a737e/anonymizeip-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "063eb7d8e567b622285697b5e9ba2b9d", "sha256": "491cb94a31bae23294c5b93a13dd5c9ed55be98003c622e76e2fe64d6a4f3e91" }, "downloads": -1, "filename": "anonymizeip-1.0.0.tar.gz", "has_sig": false, "md5_digest": "063eb7d8e567b622285697b5e9ba2b9d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.3.0", "size": 4297, "upload_time": "2018-08-25T18:51:09", "url": "https://files.pythonhosted.org/packages/4a/05/5987ce97a2a8debfba16e35efa88975f340559337b7faabb24e78b32f8c6/anonymizeip-1.0.0.tar.gz" } ] }