{ "info": { "author": "Randall Degges", "author_email": "r@rdegges.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "flask-simple-geoip\n==================\n\nThe simplest GeoIP lookup library for Flask.\n\n.. image:: https://raw.githubusercontent.com/whois-api-llc/flask-simple-geoip/master/images/geoip.png\n\n.. image:: https://img.shields.io/pypi/v/flask-simple-geoip.svg\n :alt: flask-simple-geoip Release\n :target: https://pypi.python.org/pypi/flask-simple-geoip\n\n.. image:: https://img.shields.io/travis/whois-api-llc/flask-simple-geoip.svg\n :alt: flask-simple-geoip Build\n :target: https://travis-ci.org/whois-api-llc/flask-simple-geoip\n\n\nMeta\n----\n- Author: Randall Degges\n- Email: r@rdegges.com\n- Twitter: https://twitter.com/rdegges\n- Site: http://www.rdegges.com\n- Status: production ready\n\n\nPrerequisites\n-------------\n\nTo use this library, you'll need to create a free GeoIPify account:\nhttps://geoipify.whoisxmlapi.com/\n\nIf you haven't done this yet, please do so now.\n\n\nInstallation\n------------\n\nTo install ``flask-simple-geoip`` using `pypi `_, simply run:\n\n.. code-block:: console\n\n $ pip install flask-simple-geoip\n\nIn the root of your project directory.\n\n\nUsage\n-----\n\nOnce you have `flask-simple-geoip` installed, you can use it to easily find the\nphysical location of a given IP address.\n\nThis library gives you access to all sorts of geographical location data that\nyou can use in your application in any number of ways.\n\nHere's a simple Flask app that makes use of the geolocation lookups:\n\n.. code-block:: python\n\n from flask import Flask, jsonify\n from flask_simple_geoip import SimpleGeoIP\n\n\n app = Flask(__name__)\n\n # Initialize the extension\n simple_geoip = SimpleGeoIP(app)\n\n\n @app.route('/')\n def test():\n # Retrieve geoip data for the given requester\n geoip_data = simple_geoip.get_geoip_data()\n\n return jsonify(data=geoip_data)\n\nHere's the sort of data you might get back when performing a geoip lookup\nrequest:\n\n.. code-block:: json\n\n {\n \"ip\": \"8.8.8.8\",\n \"location\": {\n \"country\": \"US\",\n \"region\": \"California\",\n \"city\": \"Mountain View\",\n \"lat\": 37.40599,\n \"lng\": -122.078514,\n \"postalCode\": \"94043\",\n \"timezone\": \"-08:00\"\n }\n }\n\nBy default, this library handles retrying failed HTTP requests for you. For\ninstance: if the GeoIPify API service is currently down or having issues,\nyour request will be retried up to three consecutive times before failing.\n\nIn the event a geoip lookup still can't return successfully, the data returned\nwill be `None`. This library will *never* throw an exception. This decision was\nmade strategically: not having geoip data should never be the cause of a failed\nrequest. =)\n\n\nChangelog\n---------\n\nAll library changes in descending order.\n\n\nVersion 0.1.1\n*************\n\n**Released June 18, 2018.**\n\n- Fixing readme so it shows properly on PyPI :(\n\n\nVersion 0.1.0\n*************\n\n**Released June 18, 2018.**\n\n- First release!\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/whois-api-llc/flask-simple-geoip", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "Flask-Simple-GeoIP", "package_url": "https://pypi.org/project/Flask-Simple-GeoIP/", "platform": "any", "project_url": "https://pypi.org/project/Flask-Simple-GeoIP/", "project_urls": { "Homepage": "https://github.com/whois-api-llc/flask-simple-geoip" }, "release_url": "https://pypi.org/project/Flask-Simple-GeoIP/0.1.1/", "requires_dist": [ "Flask", "simple-geoip", "pytest; extra == 'test'" ], "requires_python": "", "summary": "The simplest GeoIP lookup library for Flask.", "version": "0.1.1" }, "last_serial": 3976079, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1ed49088334782fa07770ebd312ecb26", "sha256": "7f1cb0cc7dad38a8d9ff535b45b9eb42c3815a0e5f2dfb090b39c4833793ef52" }, "downloads": -1, "filename": "Flask_Simple_GeoIP-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1ed49088334782fa07770ebd312ecb26", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2283, "upload_time": "2018-06-19T05:34:50", "url": "https://files.pythonhosted.org/packages/48/04/25893e7983d7555e464448436fde9c6dfd3d3a6b53e57f36fa4ac638936c/Flask_Simple_GeoIP-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7bb53572543ee210144fab007cd6bc8", "sha256": "02941c5ce70eb85f1695eeb4e457259b2f1714e187f60ea6483adea0c0f533d2" }, "downloads": -1, "filename": "Flask-Simple-GeoIP-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e7bb53572543ee210144fab007cd6bc8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3114, "upload_time": "2018-06-19T05:34:51", "url": "https://files.pythonhosted.org/packages/fa/c3/531c5eb3f00c07a1db29f9792ffc5f9ad41a16e5f9a5982b6295cf2bf8c5/Flask-Simple-GeoIP-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e816ab54b4f0c084ba43c103e44df3b4", "sha256": "6f5ec86462a1b32af15dd2be705a0d64ea238859365766e4be0b1a73c4845f4c" }, "downloads": -1, "filename": "Flask_Simple_GeoIP-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e816ab54b4f0c084ba43c103e44df3b4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3499, "upload_time": "2018-06-19T05:39:55", "url": "https://files.pythonhosted.org/packages/cb/1a/8e6ddda7c64f092bd524afa4f1145601569468a36d4c608e1c636377581e/Flask_Simple_GeoIP-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ad08af8d17f0d9f157c567565386bd2", "sha256": "52de6b998c4904528cc8abf2f6cbb60be74f7df699bb9a1187672c945ce0b8b1" }, "downloads": -1, "filename": "Flask-Simple-GeoIP-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5ad08af8d17f0d9f157c567565386bd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3609, "upload_time": "2018-06-19T05:39:55", "url": "https://files.pythonhosted.org/packages/07/ed/c02f4ada5f7457119a45c68079232fa44912462cba4f354902abfa1a2788/Flask-Simple-GeoIP-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e816ab54b4f0c084ba43c103e44df3b4", "sha256": "6f5ec86462a1b32af15dd2be705a0d64ea238859365766e4be0b1a73c4845f4c" }, "downloads": -1, "filename": "Flask_Simple_GeoIP-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e816ab54b4f0c084ba43c103e44df3b4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3499, "upload_time": "2018-06-19T05:39:55", "url": "https://files.pythonhosted.org/packages/cb/1a/8e6ddda7c64f092bd524afa4f1145601569468a36d4c608e1c636377581e/Flask_Simple_GeoIP-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ad08af8d17f0d9f157c567565386bd2", "sha256": "52de6b998c4904528cc8abf2f6cbb60be74f7df699bb9a1187672c945ce0b8b1" }, "downloads": -1, "filename": "Flask-Simple-GeoIP-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5ad08af8d17f0d9f157c567565386bd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3609, "upload_time": "2018-06-19T05:39:55", "url": "https://files.pythonhosted.org/packages/07/ed/c02f4ada5f7457119a45c68079232fa44912462cba4f354902abfa1a2788/Flask-Simple-GeoIP-0.1.1.tar.gz" } ] }