{ "info": { "author": "Jacob Magnusson", "author_email": "m@jacobian.se", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "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": "**Author:** Jacob Magnusson. [Follow me on Twitter](https://twitter.com/jacobsvante_)\n\n## About\n\nThis is a simple Flask extension for pygeoip. Not yet thoroughly tested, but has been working great for me so far.\n\n\n## Installation\n\nInstall using `pip`...\n\n pip install Flask-GeoIP\n\n...or clone the project from github.\n\n git clone https://github.com/jmagnusson/Flask-GeoIP.git\n\n\n## Configuration\n\n\nThe GeoIP file that you want to use needs to be set in your config:\n\n GEOIP_FILEPATH = '/path/to/geoip.dat'\n\nYou can change the caching method (default is 'STANDARD') that is used\nby pygeoip:\n\n GEOIP_CACHE = 'MEMORY_CACHE'\n\nThen in the code you do:\n\n from flask.ext.geoip import GeoIP\n app = Flask(__name__)\n app.config.from_pyfile('/path/to/myconfig.py')\n geoip = GeoIP(app)\n country = geoip.country_name_by_addr('1.2.3.4')\n\nOr if using a factory function for creating your app:\n\n from flask.ext.geoip import GeoIP\n geoip = GeoIP()\n ...\n app = create_app('/path/to/myconfig.py')\n geoip.init_app(app)\n country = geoip.country_name_by_addr('1.2.3.4')\n\n\n## Documentation\n\nThis readme.\n\n\n## Credits\n\nThanks go out to [maxmind](https://github.com/maxmind/geoip-api-c) and [appliedsec](https://github.com/appliedsec/pygeoip) for making these great libs.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jmagnusson/Flask-GeoIP", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "Flask-GeoIP", "package_url": "https://pypi.org/project/Flask-GeoIP/", "platform": "any", "project_url": "https://pypi.org/project/Flask-GeoIP/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jmagnusson/Flask-GeoIP" }, "release_url": "https://pypi.org/project/Flask-GeoIP/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Flask-GeoIP\n-------------\n\nSimple Flask extension for pygeoip.", "version": "0.1.3" }, "last_serial": 2375195, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "8b29581b7cc98650a1a33f1dbbfaac39", "sha256": "692f2db5027400661d3b618ac2f2db2fe47c5a3a2efa7d68d8828264c92dec27" }, "downloads": -1, "filename": "Flask-GeoIP-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8b29581b7cc98650a1a33f1dbbfaac39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4028, "upload_time": "2013-11-08T01:16:29", "url": "https://files.pythonhosted.org/packages/54/82/a1bcf45eceb42b482878247fd553cdee10dc1bd9182c981346eb7d43bd63/Flask-GeoIP-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "5ed51aa36e218b2ff738eba6542b4a4c", "sha256": "dbddee7f42f8910011089b804e00c87d298b19373d0f2f1652383ca19e34c64f" }, "downloads": -1, "filename": "Flask-GeoIP-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5ed51aa36e218b2ff738eba6542b4a4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4026, "upload_time": "2013-11-08T14:45:11", "url": "https://files.pythonhosted.org/packages/16/05/bde8e67a0db3e21e6da7e336a778c25e5151a1e0a48efb2b6a0243392e54/Flask-GeoIP-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "3a68621ca31fd6d868960b75059d2011", "sha256": "285839d75226df6d127be627a3060b554a2d3f96fe67b8dd76f0b46e91abdfba" }, "downloads": -1, "filename": "Flask-GeoIP-0.1.2.tar.gz", "has_sig": false, "md5_digest": "3a68621ca31fd6d868960b75059d2011", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4124, "upload_time": "2015-02-04T14:01:26", "url": "https://files.pythonhosted.org/packages/7a/af/c02bb8f9f9eb44e3c17f76c1158145a1d1aa2a79cbfba6b20831d91d9482/Flask-GeoIP-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "79218d7b2b7576e01842526e57a662e4", "sha256": "3567ba970b2a5c013953a965d3d88f955983955c65f3e9af12c9e5c28a218abe" }, "downloads": -1, "filename": "Flask_GeoIP-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "79218d7b2b7576e01842526e57a662e4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5296, "upload_time": "2016-10-01T18:13:21", "url": "https://files.pythonhosted.org/packages/42/55/f172aff8e9969ede5c0fa5d8e16f5275c2885477e1c36c8d30569f34c3f8/Flask_GeoIP-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f99c5643d82dc3c94a21c413b5d0eef3", "sha256": "2ec7a96e330b872178fa82c3f433bc96b63b384af429253c7b1d180fc3672a0a" }, "downloads": -1, "filename": "Flask-GeoIP-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f99c5643d82dc3c94a21c413b5d0eef3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4157, "upload_time": "2016-10-01T18:13:18", "url": "https://files.pythonhosted.org/packages/e0/67/ba5551f2e5a12c1d687e0ad8840eac5c4fba23cd1fe4e03e786081017f72/Flask-GeoIP-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "79218d7b2b7576e01842526e57a662e4", "sha256": "3567ba970b2a5c013953a965d3d88f955983955c65f3e9af12c9e5c28a218abe" }, "downloads": -1, "filename": "Flask_GeoIP-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "79218d7b2b7576e01842526e57a662e4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5296, "upload_time": "2016-10-01T18:13:21", "url": "https://files.pythonhosted.org/packages/42/55/f172aff8e9969ede5c0fa5d8e16f5275c2885477e1c36c8d30569f34c3f8/Flask_GeoIP-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f99c5643d82dc3c94a21c413b5d0eef3", "sha256": "2ec7a96e330b872178fa82c3f433bc96b63b384af429253c7b1d180fc3672a0a" }, "downloads": -1, "filename": "Flask-GeoIP-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f99c5643d82dc3c94a21c413b5d0eef3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4157, "upload_time": "2016-10-01T18:13:18", "url": "https://files.pythonhosted.org/packages/e0/67/ba5551f2e5a12c1d687e0ad8840eac5c4fba23cd1fe4e03e786081017f72/Flask-GeoIP-0.1.3.tar.gz" } ] }