{ "info": { "author": "Tomas Caha", "author_email": "tomas-net@seznam.cz", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet", "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Utilities" ], "description": "\n===========\nip2geotools\n===========\n\nDescription\n-----------\n\n``ip2geotools`` is a simple tool for getting geolocation information on given IP address from various geolocation databases. This package provides an API for several geolocation databases.\n\nInstallation\n------------\n\nTo install the ``ip2geotools`` module, type:\n\n.. code-block:: bash\n\n $ pip install ip2geotools\n\nBasic usage\n-----------\n\n.. code-block:: pycon\n\n >>> from ip2geotools.databases.noncommercial import DbIpCity\n >>> response = DbIpCity.get('147.229.2.90', api_key='free')\n >>> response.ip_address\n '147.229.2.90'\n >>> response.city\n 'Brno (Brno st\u0159ed)'\n >>> response.region\n 'South Moravian'\n >>> response.country\n 'CZ'\n >>> response.latitude\n 49.1926824\n >>> response.longitude\n 16.6182105\n >>> response.to_json()\n '{\"ip_address\": \"147.229.2.90\", \"city\": \"Brno (Brno st\u0159ed)\", \"region\": \"South Moravian\", \"country\": \"CZ\", \"latitude\": 49.1926824, \"longitude\": 16.6182105}'\n >>> response.to_xml()\n '147.229.2.90Brno (Brno st\u0159ed)South MoravianCZ49.192682416.6182105'\n >>> response.to_csv(',')\n '147.229.2.90,Brno (Brno st\u0159ed),South Moravian,CZ,49.1926824,16.6182105'\n\nCommand-line usage\n------------------\n\nWhen installed, you can invoke ``ip2geotools`` from the command-line:\n\n.. code:: bash\n\n ip2geotools [-h] -d {dbipcity,hostip,freegeoip,ipstack,maxmindgeolite2city,ip2location,dbipweb,maxmindgeoip2city,ip2locationweb,neustarweb,geobytescitydetails,skyhookcontextacceleratorip,ipinfo,eurek,ipdata}\n [--api_key API_KEY] [--db_path DB_PATH] [-u USERNAME]\n [-p PASSWORD] [-f {json,xml,csv-space,csv-tab,inline}] [-v]\n IP_ADDRESS\n\nWhere:\n\n* ``ip2geotools``: is the script when installed in your environment, in development you could use ``python -m ip2geotools`` instead\n\n* ``IP_ADDRESS``: IP address to be checked\n\n* ``-h``, ``--help``: show help message and exit\n\n* ``-d {dbipcity,hostip,...,ipdata}``: geolocation database to be used (case insesitive)\n\n* ``--api_key API_KEY``: API key for given geolocation database (if needed)\n\n* ``--db_path DB_PATH``: path to geolocation database file (if needed)\n\n* ``-u USERNAME``, ``--username USERNAME``: username for accessing given geolocation database (if needed)\n\n* ``-p PASSWORD``, ``--password PASSWORD``: password for accessing given geolocation database (if needed)\n\n* ``-f {json,xml,csv-space,csv-tab,inline}``, ``--format {json,xml,csv-space,csv-tab,inline}``: output data format\n\n* ``-v``, ``--version``: show program's version number and exit\n\nExamples:\n\n.. code:: bash\n\n $ ip2geotools 147.229.2.90 -d dbipcity -f json\n {\"ip_address\": \"147.229.2.90\", \"city\": \"Brno (Brno st\u0159ed)\", \"region\": \"South Moravian\", \"country\": \"CZ\", \"latitude\": 49.1926824, \"longitude\": 16.6182105}\n\nModels\n------\n\nThis module contains models for the data returned by geolocation databases\nand these models are also used for comparison of given and provided data.\n\n``ip2geotools.models.IpLocation``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nModel for storing location of given IP address.\n\nAttributes:\n\n* ``ip_address``: IP address\n* ``city``: city where IP address is located\n* ``region``: region where IP address is located\n* ``country``: country where IP address is located (two letters country code)\n* ``latitude``: latitude where IP address is located\n* ``longitude``: longitude where IP address is located\n\nMethods:\n\n* ``to_json``: returns model data in JSON format\n* ``to_xml``: returns model data in XML format (root element: ``ip_location``)\n* ``to_csv``: returns model data in CSV format separated by given delimiter\n* ``__str__``: internal string representation of model, every single information on new line\n\nExceptions\n----------\n\nThis module provides special exceptions used when accessing data from\nthird-party geolocation databases.\n\n* ``ip2geotools.errors.LocationError``: a generic location error\n* ``ip2geotools.errors.IpAddressNotFoundError``: the IP address was not found\n* ``ip2geotools.errors.PermissionRequiredError``: problem with authentication or authorization of the request; check your permission for accessing the service\n* ``ip2geotools.errors.InvalidRequestError``: invalid request\n* ``ip2geotools.errors.InvalidResponseError``: invalid response\n* ``ip2geotools.errors.ServiceError``: response from geolocation database is invalid (not accessible, etc.)\n* ``ip2geotools.errors.LimitExceededError``: limits of geolocation database have been reached\n\nDatabases\n---------\n\nFollowing classes access many different noncommercial and commercial geolocation databases using defined interface.\n\n``ip2geotools.databases.interfaces``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n* ``IGeoIpDatabase``: interface for unified access to the data provided by various geolocation databases\n\n``ip2geotools.databases.noncommercial``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n* ``DbIpCity``: https://db-ip.com/api/\n* ``HostIP``: http://hostip.info/\n* ``Freegeoip``: http://freegeoip.net/ **Database is deprecated!**\n* ``Ipstack``: https://ipstack.com/\n* ``MaxMindGeoLite2City``: https://dev.maxmind.com/geoip/geoip2/geolite2/\n* ``Ip2Location``: https://lite.ip2location.com/database/ip-country-region-city-latitude-longitude\n\n``ip2geotools.databases.commercial``\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n* ``DbIpWeb``: https://db-ip.com/\n* ``MaxMindGeoIp2City``: https://www.maxmind.com/\n* ``Ip2LocationWeb``: https://www.ip2location.com/\n* ``NeustarWeb``: https://www.neustar.biz/resources/tools/ip-geolocation-lookup-tool/\n* ``GeobytesCityDetails``: http://geobytes.com/get-city-details-api/\n* ``SkyhookContextAcceleratorIp``: http://www.skyhookwireless.com/\n* ``IpInfo``: https://ipinfo.io/\n* ``Eurek``: https://www.eurekapi.com/\n* ``Ipdata``: https://ipdata.co/\n\nRequirements\n------------\n\nThis code requires Python 3.3+ and several other packages listed in ``requirements.txt``.\n\nSupport\n-------\n\nPlease report all issues with this code using the `GitHub issue tracker\n`_\n\nLicense\n-------\n\n``ip2geotools`` is released under the MIT License. See the bundled `LICENSE`_ file for details.\n\nAuthor\n------\n\n``ip2geotools`` was written by Tomas Caha for master\\'s thesis at `FEEC `_ `BUT `_ 2018/2019.\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/tomas-net/ip2geotools/archive/0.1.5.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tomas-net/ip2geotools", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "ip2geotools", "package_url": "https://pypi.org/project/ip2geotools/", "platform": "", "project_url": "https://pypi.org/project/ip2geotools/", "project_urls": { "Download": "https://github.com/tomas-net/ip2geotools/archive/0.1.5.tar.gz", "Homepage": "https://github.com/tomas-net/ip2geotools" }, "release_url": "https://pypi.org/project/ip2geotools/0.1.5/", "requires_dist": [ "astroid (>=2.1.0)", "autopep8 (>=1.4.3)", "bleach (>=3.0.2)", "certifi (>=2018.10.15)", "chardet (>=3.0.4)", "Click (>=7.0)", "cssselect (>=1.0.3)", "decorator (>=4.3.0)", "dicttoxml (>=1.7.4)", "docutils (>=0.14)", "future (>=0.17.1)", "geocoder (>=1.38.1)", "geoip2 (>=2.9.0)", "idna (>=2.7)", "IP2Location (>=8.0.3)", "isort (>=4.3.4)", "lazy-object-proxy (>=1.3.1)", "lxml (>=4.2.5)", "maxminddb (>=1.4.1)", "mccabe (>=0.6.1)", "packaging (>=18.0)", "pip-review (>=1.0)", "pkginfo (>=1.4.2)", "pycodestyle (>=2.4.0)", "Pygments (>=2.3.0)", "pylint (>=2.2.0)", "pyparsing (>=2.3.0)", "pyquery (>=1.4.0)", "ratelim (>=0.1.6)", "readme-renderer (>=24.0)", "requests (>=2.20.1)", "requests-toolbelt (>=0.8.0)", "selenium (>=3.141.0)", "six (>=1.11.0)", "tqdm (>=4.28.1)", "twine (>=1.12.1)", "typed-ast (>=1.1.0)", "typing (>=3.6.6)", "urllib3 (>=1.24.1)", "webencodings (>=0.5.1)", "wrapt (>=1.10.11)" ], "requires_python": "", "summary": "Simple tool for getting geolocation information on given IP address from various geolocation databases.", "version": "0.1.5" }, "last_serial": 5144567, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "71e07f1c24844f13ca91013867291bbb", "sha256": "7ae6c0ccd9e124067dcd8877d98fee55668febd2ad4555a256ceb6ca35dc03e7" }, "downloads": -1, "filename": "ip2geotools-0.1.tar.gz", "has_sig": false, "md5_digest": "71e07f1c24844f13ca91013867291bbb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8240, "upload_time": "2017-10-31T23:45:46", "url": "https://files.pythonhosted.org/packages/66/d1/ed4460fe9b85cbba9834456e077c9589811672209cc32399d2a4bf6293df/ip2geotools-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "eb828561734a490c7a5749d26cd1fcd8", "sha256": "1b8f759400412dd8615fc2fafabe116eb1f2d1ea6b8c5415e6534361679a534b" }, "downloads": -1, "filename": "ip2geotools-0.1.1.tar.gz", "has_sig": false, "md5_digest": "eb828561734a490c7a5749d26cd1fcd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12519, "upload_time": "2017-11-01T08:57:05", "url": "https://files.pythonhosted.org/packages/15/30/24cd7900d438d6817a5f7a454c05ada7a231665f132766a3aa58e515f4ee/ip2geotools-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "5bd3693cbd1fd02f1ff500dbeecb9962", "sha256": "a511b4863df300d69a86942037fb7f79aee92608b985a6298ecabddbadf58ef8" }, "downloads": -1, "filename": "ip2geotools-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "5bd3693cbd1fd02f1ff500dbeecb9962", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18390, "upload_time": "2017-11-30T00:26:43", "url": "https://files.pythonhosted.org/packages/22/23/04f9568cc21f47938d2e094b723666fd82533727997fc1d06c14464a7e3d/ip2geotools-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dd0cb5f131a173818183dac9b41b6128", "sha256": "e189b3fe14a1ce1005ea3d924c40d9c6c776c48bbb99ea84291873499e85a7cc" }, "downloads": -1, "filename": "ip2geotools-0.1.2.tar.gz", "has_sig": false, "md5_digest": "dd0cb5f131a173818183dac9b41b6128", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14171, "upload_time": "2017-11-30T00:26:44", "url": "https://files.pythonhosted.org/packages/5a/0a/0fe89c4b3fe66263d5572ae27e95cb4b2c341d8fdb84074eb92835970307/ip2geotools-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "ca79d84de77b474d9507e925422bf176", "sha256": "8cf2db4681dc652a148c15774531237f4c79169c20a80937b18b267b8620ad53" }, "downloads": -1, "filename": "ip2geotools-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ca79d84de77b474d9507e925422bf176", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15954, "upload_time": "2018-11-27T08:35:41", "url": "https://files.pythonhosted.org/packages/11/7d/af05d529e6127236f5d953f934b64aa8685506f2422c39470eeff8173932/ip2geotools-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "585d556c9b3d79a471913a1cd62004f7", "sha256": "f417d666aa77c9413ac00b4ec84338b752e6d5d093e91d455d970e2393643490" }, "downloads": -1, "filename": "ip2geotools-0.1.3.tar.gz", "has_sig": false, "md5_digest": "585d556c9b3d79a471913a1cd62004f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14856, "upload_time": "2018-11-27T08:35:44", "url": "https://files.pythonhosted.org/packages/10/27/7639f5312706047036a68f211b1e45b16096ec73e510ce7ade3add1955e2/ip2geotools-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "83591543f6ba1ab41bf1843d6d8c9f43", "sha256": "b2bd1c0aff5274ee1541d2ddcd3ad69c7a0e3deca18383272525ea354edca3ec" }, "downloads": -1, "filename": "ip2geotools-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "83591543f6ba1ab41bf1843d6d8c9f43", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16427, "upload_time": "2019-02-19T23:38:08", "url": "https://files.pythonhosted.org/packages/12/4c/1657178cf9acd4acf214a67e530d8047a30bb789e4f3f000109f534c01e0/ip2geotools-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "34f77306751e1230f4bee197b303de98", "sha256": "e071876b3a03cd5ae6d92236b50066fa21c9b172cc166dc1f34044cd7dcafbb0" }, "downloads": -1, "filename": "ip2geotools-0.1.4.tar.gz", "has_sig": false, "md5_digest": "34f77306751e1230f4bee197b303de98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15462, "upload_time": "2019-02-19T23:38:11", "url": "https://files.pythonhosted.org/packages/97/de/addc2a0db7e2584f3fa960549c15439cfab70c30935ee453fb938e75de6e/ip2geotools-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "99c655c937cc10d9b4769e988523d9bf", "sha256": "542042b3f7153268bab0e3e7c1ffa7ef37c2a50fbf7d415d8638cf8732449bda" }, "downloads": -1, "filename": "ip2geotools-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "99c655c937cc10d9b4769e988523d9bf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16421, "upload_time": "2019-04-15T12:58:49", "url": "https://files.pythonhosted.org/packages/54/7d/b7e3252625443b5900feb009eb70527c65c2e5948b0eb7d0ffc063833441/ip2geotools-0.1.5-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99c655c937cc10d9b4769e988523d9bf", "sha256": "542042b3f7153268bab0e3e7c1ffa7ef37c2a50fbf7d415d8638cf8732449bda" }, "downloads": -1, "filename": "ip2geotools-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "99c655c937cc10d9b4769e988523d9bf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16421, "upload_time": "2019-04-15T12:58:49", "url": "https://files.pythonhosted.org/packages/54/7d/b7e3252625443b5900feb009eb70527c65c2e5948b0eb7d0ffc063833441/ip2geotools-0.1.5-py3-none-any.whl" } ] }