{ "info": { "author": "Ipregistry Team", "author_email": "support@ipregistry.co", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10" ], "description": "[\"Ipregistry\"](https://ipregistry.co/) \n# Ipregistry Python Client Library\n\n[![License](http://img.shields.io/:license-apache-blue.svg)](LICENSE)\n[![Actions Status](https://github.com/ipregistry/ipregistry-python/workflows/Tests/badge.svg)](https://github.com/ipregistry/ipregistry-python/actions)\n[![PyPI](https://img.shields.io/pypi/v/ipregistry)](https://pypi.org/project/ipregistry/)\n\nThis is the official Python client library for the [Ipregistry](https://ipregistry.co) IP geolocation and threat data API, \nallowing you to lookup your own IP address or specified ones. Responses return multiple data points including carrier, \ncompany, currency, location, timezone, threat information, and more.\n\nStarting version 3 of the library, support for Python 2 has been dropped and the library requires Python 3.6+.\n\n## Getting Started\n\nYou'll need an Ipregistry API key, which you can get along with 100,000 free lookups by signing up for a free account at [https://ipregistry.co](https://ipregistry.co).\n\n### Installation\n\n```\npip install ipregistry\n```\n\n### Quick Start\n\n#### Single IP Lookup\n\n```python\nfrom ipregistry import IpregistryClient\n\nclient = IpregistryClient(\"YOUR_API_KEY\")\nipInfo = client.lookup(\"54.85.132.205\")\nprint(ipInfo)\n```\n\n#### Batch IP Lookup\n\n```python\nfrom ipregistry import IpregistryClient\n\nclient = IpregistryClient(\"YOUR_API_KEY\")\nresults = client.lookup([\"54.85.132.205\", \"8.8.8.8\", \"2001:67c:2e8:22::c100:68b\"])\nfor ipInfo in results:\n print(ipInfo)\n```\n\n#### Origin IP Lookup\n\n```python\nfrom ipregistry import IpregistryClient\n\nclient = IpregistryClient(\"YOUR_API_KEY\")\nipInfo = client.lookup()\nprint(ipInfo)\n```\n\nMore advanced examples are available in the [samples](https://github.com/ipregistry/ipregistry-python/tree/master/samples) \nfolder.\n\n### Caching\n\nThis Ipregistry client library has built-in support for in-memory caching. By default caching is disabled. \nBelow are examples to enable and configure a caching strategy. Once enabled, default cache strategy is to memoize up to \n2048 lookups for at most 10min. You can change preferences as follows:\n\n#### Enabling caching\n\nEnable caching by passing an instance of `InMemoryCache`:\n\n```python\nfrom ipregistry import InMemoryCache, IpregistryClient\n\nclient = IpregistryClient(\"YOUR_API_KEY\", cache=InMemoryCache(maxsize=2048, ttl=600))\n```\n\n#### Disabling caching\n\nDisable caching by passing an instance of `NoCache`:\n\n```python\nfrom ipregistry import IpregistryClient, NoCache\n\nclient = IpregistryClient(\"YOUR_API_KEY\", cache=NoCache())\n```\n\n### Errors\n\nAll Ipregistry exceptions inherit `IpregistryError` class.\n\nMain subtypes are `ApiError` and `ClientError`.\n\nErrors of type _ApiError_ include a code field that maps to the one described in the [Ipregistry documentation](https://ipregistry.co/docs/errors).\n\n### Filtering bots\n\nYou might want to prevent Ipregistry API requests for crawlers or bots browsing your pages.\n\nA manner to proceed is to identify bots using the `User-Agent` header. \nTo ease this process, the library includes a utility method:\n\n```python\nfrom ipregistry import UserAgent\n\nisBot = UserAgent.isBot('YOUR_USER_AGENT_HEADER_VALUE_HERE')\n```\n\n## Other Libraries\n\nThere are official Ipregistry client libraries available for many languages including \n[Java](https://github.com/ipregistry/ipregistry-java), \n[Javascript](https://github.com/ipregistry/ipregistry-javascript), and more.\n\nAre you looking for an official client with a programming language or framework we do not support yet? \n[let us know](mailto:support@ipregistry.co).\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://ipregistry.co", "keywords": "ipinfo,ipregistry,ip-address,ip-data,ip-geolocation,threat-detection,user-agent-parsing", "license": "Apache-2.0", "maintainer": "", "maintainer_email": "", "name": "ipregistry", "package_url": "https://pypi.org/project/ipregistry/", "platform": "", "project_url": "https://pypi.org/project/ipregistry/", "project_urls": { "Homepage": "https://ipregistry.co", "Repository": "https://github.com/ipregistry/ipregistry-python" }, "release_url": "https://pypi.org/project/ipregistry/3.2.0/", "requires_dist": [ "cachetools (>=4.2.4,<5.0.0)", "requests (>=2.26.0,<3.0.0)", "six (>=1.16.0,<2.0.0)" ], "requires_python": ">=3.6,<4.0", "summary": "Official Python library for Ipregistry", "version": "3.2.0", "yanked": false, "yanked_reason": null }, "last_serial": 11977239, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "17bf6a5d65ccf5db14bd5790ad452def", "sha256": "8bae319a330306cb2c4c59eed0b857868aae4859e09fcdedb4569cb9b4c0e75c" }, "downloads": -1, "filename": "ipregistry-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "17bf6a5d65ccf5db14bd5790ad452def", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11733, "upload_time": "2019-07-28T08:26:20", "upload_time_iso_8601": "2019-07-28T08:26:20.593104Z", "url": "https://files.pythonhosted.org/packages/22/fa/839b22f831c7b71dd88ab0d568aaa35a13bbd2bac84be834eaba114413c2/ipregistry-1.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "4f4ca850fa54fb739c4b87a03229d14e", "sha256": "7a724a05e5c074f35b127a70b4521e7f423208056965174a0cecb5d056936925" }, "downloads": -1, "filename": "ipregistry-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4f4ca850fa54fb739c4b87a03229d14e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4907, "upload_time": "2019-07-28T08:26:23", "upload_time_iso_8601": "2019-07-28T08:26:23.144707Z", "url": "https://files.pythonhosted.org/packages/77/aa/337a01077488c5293efa7c787b8264085f95f82f29f5452876a1ad89377e/ipregistry-1.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "83d847b5b1fe556f3f69f61fbfe0a69e", "sha256": "04db77271d24f640fc3ca6bfefa8e2579eeeb823a15390dba42be6c2c0b3063a" }, "downloads": -1, "filename": "ipregistry-1.1.0.tar.gz", "has_sig": false, "md5_digest": "83d847b5b1fe556f3f69f61fbfe0a69e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4935, "upload_time": "2019-10-27T20:49:43", "upload_time_iso_8601": "2019-10-27T20:49:43.426784Z", "url": "https://files.pythonhosted.org/packages/96/7f/1b06de993a6e69883dba6f0ab9eb2e25fa786bb8839802378edaafd1a914/ipregistry-1.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "096c3065b68276545e12e74f5e67a20f", "sha256": "f07a5f9b8b791b83f648f47475e53d600a91cc52d8f7658486d946a87bb9bad0" }, "downloads": -1, "filename": "ipregistry-2.0.0.tar.gz", "has_sig": false, "md5_digest": "096c3065b68276545e12e74f5e67a20f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5786, "upload_time": "2020-07-05T15:29:43", "upload_time_iso_8601": "2020-07-05T15:29:43.656321Z", "url": "https://files.pythonhosted.org/packages/aa/eb/791256c45052d3fde4fe7e6d10b489f025b943ce56cfde691cff46dd1090/ipregistry-2.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "04d681cdc3339ff265b9308d6e843b01", "sha256": "8c86c765c92c8e5607530d311a30ae7a95dbe8855af2f35164560771eb05fc72" }, "downloads": -1, "filename": "ipregistry-2.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "04d681cdc3339ff265b9308d6e843b01", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7", "size": 11869, "upload_time": "2020-09-25T15:04:45", "upload_time_iso_8601": "2020-09-25T15:04:45.158393Z", "url": "https://files.pythonhosted.org/packages/85/c2/d9ce7785453803492df3aa027ee3c321f31959ce866b6b6495b952424c0a/ipregistry-2.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "de250e5ddaaad99ac95df594f5c7a1ad", "sha256": "eda5d2ddc57b31d08fd1d7e8b0c2c4103c07a123a99702cf30148a6f66863cd7" }, "downloads": -1, "filename": "ipregistry-2.0.1.tar.gz", "has_sig": false, "md5_digest": "de250e5ddaaad99ac95df594f5c7a1ad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 5920, "upload_time": "2020-09-25T15:04:46", "upload_time_iso_8601": "2020-09-25T15:04:46.798729Z", "url": "https://files.pythonhosted.org/packages/ef/89/b7e5ee89be8ac3c24bc23aebe8cce790fb04ed6c1f5f403fa42d32f70a2e/ipregistry-2.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "89dd04dc973d5ffe974824b555c5df73", "sha256": "7f9af52fa83f2d653d5cacb47da07bad17602b3b56eb343f5ce55236da5aab91" }, "downloads": -1, "filename": "ipregistry-3.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "89dd04dc973d5ffe974824b555c5df73", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 11910, "upload_time": "2021-04-08T22:21:28", "upload_time_iso_8601": "2021-04-08T22:21:28.446930Z", "url": "https://files.pythonhosted.org/packages/ff/cb/64e91b5df49056b70ae3868410b8468d131c11f484b79bae21c363b1a6c0/ipregistry-3.0.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "432fc270e73177b0fa7e4322e99eeb07", "sha256": "e1832c3d61a167ce25d2876ec26e4d852b6f6268ffc4c6bc5ca6bd4fb9634ab9" }, "downloads": -1, "filename": "ipregistry-3.0.0.tar.gz", "has_sig": false, "md5_digest": "432fc270e73177b0fa7e4322e99eeb07", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5962, "upload_time": "2021-04-08T22:21:29", "upload_time_iso_8601": "2021-04-08T22:21:29.873554Z", "url": "https://files.pythonhosted.org/packages/21/46/9c139473786a33f6f7f987c51781c5cb550a135a84800eb20eb471c452e3/ipregistry-3.0.0.tar.gz", "yanked": false, "yanked_reason": null } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "4c65513f7bdc1eb6ceb2f130d7d3d499", "sha256": "72136db4bad7f418ec581924ddc80fe756f2ddcbcbbba3ce60825952b5620f74" }, "downloads": -1, "filename": "ipregistry-3.1.0.tar.gz", "has_sig": false, "md5_digest": "4c65513f7bdc1eb6ceb2f130d7d3d499", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5970, "upload_time": "2021-10-26T21:54:15", "upload_time_iso_8601": "2021-10-26T21:54:15.080065Z", "url": "https://files.pythonhosted.org/packages/bf/33/63109753978c85b08b36ec86ccd4133a0e1fd46c02ba83e15881593846c0/ipregistry-3.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "3.2.0": [ { "comment_text": "", "digests": { "md5": "e552f720c60aaf543f457ea4c292add1", "sha256": "b1303c5d38130bedf123b52992408fd55577142bf3a0ed25129deffd976062f3" }, "downloads": -1, "filename": "ipregistry-3.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e552f720c60aaf543f457ea4c292add1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 11877, "upload_time": "2021-11-09T20:34:37", "upload_time_iso_8601": "2021-11-09T20:34:37.099711Z", "url": "https://files.pythonhosted.org/packages/02/c9/9e96d519c4ed069c0d353af88227a12b1f5c33e9a1700030a041e71c9c53/ipregistry-3.2.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "b3882f146ae26d213adb0f74a576ed48", "sha256": "63ff48f4d8c5e481c4c7f6df96ea468e86d5d0273db59a49814cf417182887c4" }, "downloads": -1, "filename": "ipregistry-3.2.0.tar.gz", "has_sig": false, "md5_digest": "b3882f146ae26d213adb0f74a576ed48", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 9308, "upload_time": "2021-11-09T20:34:39", "upload_time_iso_8601": "2021-11-09T20:34:39.195979Z", "url": "https://files.pythonhosted.org/packages/d8/5f/f93ea4c373d0c5f7cffdb671fb3826cb82a60bef51c107ccfa1b73654319/ipregistry-3.2.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e552f720c60aaf543f457ea4c292add1", "sha256": "b1303c5d38130bedf123b52992408fd55577142bf3a0ed25129deffd976062f3" }, "downloads": -1, "filename": "ipregistry-3.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e552f720c60aaf543f457ea4c292add1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 11877, "upload_time": "2021-11-09T20:34:37", "upload_time_iso_8601": "2021-11-09T20:34:37.099711Z", "url": "https://files.pythonhosted.org/packages/02/c9/9e96d519c4ed069c0d353af88227a12b1f5c33e9a1700030a041e71c9c53/ipregistry-3.2.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "b3882f146ae26d213adb0f74a576ed48", "sha256": "63ff48f4d8c5e481c4c7f6df96ea468e86d5d0273db59a49814cf417182887c4" }, "downloads": -1, "filename": "ipregistry-3.2.0.tar.gz", "has_sig": false, "md5_digest": "b3882f146ae26d213adb0f74a576ed48", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 9308, "upload_time": "2021-11-09T20:34:39", "upload_time_iso_8601": "2021-11-09T20:34:39.195979Z", "url": "https://files.pythonhosted.org/packages/d8/5f/f93ea4c373d0c5f7cffdb671fb3826cb82a60bef51c107ccfa1b73654319/ipregistry-3.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }