{ "info": { "author": "Philipp Wassibauer", "author_email": "phil@gidsy.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "GeoIp Data and helpers\n======================\n\nInstallation\n------------\n\n::\n\n pip install django-geoip-utils\n\nIn your settings write::\n\n import geoip_utils\n GEOIP_PATH = geoip_utils.where()\n\n\nThis product includes GeoLite data created by MaxMind, available from http://maxmind.com/\n\n\nSettings\n--------\n\nGEOIP_REQUEST_IP_RESOLVER\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\n:Default: ``'geoip_utils.core.remote_addr_ip'``\n\nThe function used for getting the IP of the client from the request.\n\n:Options:\n\n* ``'geoip_utils.utils.remote_addr_ip'``\n\n Uses the REMOTE_ADDR of the request. Good for development and standard setup\n\n* ``'geoip_utils.utils.x_forwarded_ip'``\n\n Picks the first IP of the ``HTTP_X_FORWARDED_FOR`` request header.\n This is useful for Load balancers, but could be spoofed in some cases.\n Amazon ELB sets this reliably though.\n\n* ``'geoip_utils.utils.real_ip'``\n\n Uses the HTTP_X_REAL_IP attribute\n\nGEOIP_CACHE_METHOD\n^^^^^^^^^^^^^^^^^^\n\n:Default: ``django.contrib.gis.geoip.GeoIP.GEOIP_STANDARD``\n\nThe caching function used for retrieving the location.\n\n:Options:\n\n* ``django.contrib.gis.geoip.GeoIP.GEOIP_STANDARD``\n\n Read database from filesystem, uses least memory\n\n* ``django.contrib.gis.geoip.GeoIP.GEOIP_MEMORY_CACHE``\n\n Load database into memory, faster performance but uses more memory\n\n* ``django.contrib.gis.geoip.GeoIP.GEOIP_CHECK_CACHE``\n\n check for updated database. If database has been updated, reload\n filehandle and/or memory cache. This option is not thread safe but\n is good for development.\n\n* ``django.contrib.gis.geoip.GeoIP.GEOIP_INDEX_CACHE``\n\n Just cache the most frequently accessed index portion of the database,\n resulting in faster lookups than ``GEOIP_STANDARD``, but less memory\n usage than ``GEOIP_MEMORY_CACHE`` - useful for larger databases such as\n GeoIP Organization and GeoIP City. Note, for GeoIP Country, Region and\n Netspeed databases, ``GEOIP_INDEX_CACHE`` is equivalent to\n ``GEOIP_MEMORY_CACHE``.\n\n* ``django.contrib.gis.geoip.GeoIP.GEOIP_MMAP_CACHE``\n\n Loads database into mmap shared memory (not available on Windows).\n\nUtilities\n---------\n\nThere are a few server utility functions to make the handling easier::\n\n from geoip_utils import core as geoip\n \n geoip.get_country(request)\n \n geoip.get_city(request)\n \n geoip.get_lat_lon(request)\n \n geoip.get_country_code(request)\n \n geoip.get_country_name(request)\n \n\nTemplate filters\n----------------\n\nThere are filters for extracting the information you need in the templates.\nYou need to have ``django.core.context_processors.request`` enabled in your\nTEMPLATE_CONTEXT_PROCESSORS::\n\n {% load geoip_tags %}\n\n {{ request|country_code_of_request }}\n {{ request|city_name_of_request }}\n {{ request|postal_code_of_request }}\n {{ request|region_of_request }}\n {{ request|dma_code_of_request }}\n {{ request|area_code_of_request }}\n {{ request|lat_of_request }}\n {{ request|lon_of_request }}\n\nManagement command\n------------------\n\nYou can run the ``update_geoip_data`` management command to download updated\nGeoIP data in place.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/Gidsy/django-geoip-utils", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-geoip-utils", "package_url": "https://pypi.org/project/django-geoip-utils/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-geoip-utils/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/Gidsy/django-geoip-utils" }, "release_url": "https://pypi.org/project/django-geoip-utils/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "GeoIp data as an app to facilitate installing. Also features template filters, utility functions and a management command for updating the GeoIP data.", "version": "0.1.1" }, "last_serial": 789744, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "a9629cc45944fe153892bd4152f77768", "sha256": "2cf7b68a955e1d72b3e7d69b62c9d9879147959341b756eb0dd91a43c9129e8b" }, "downloads": -1, "filename": "django-geoip-utils-0.0.2.tar.gz", "has_sig": false, "md5_digest": "a9629cc45944fe153892bd4152f77768", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19016852, "upload_time": "2012-01-11T10:47:50", "url": "https://files.pythonhosted.org/packages/48/ae/40a920ac019de38cc93800eb59f5597ee740bb5618e02a43a24f87ac7c19/django-geoip-utils-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "86b47432f0ad021f92a0c10662bf914d", "sha256": "12577134c7d76141a69494c71656c786b2a54c7dd721d4d7ce812739a114bfbb" }, "downloads": -1, "filename": "django-geoip-utils-0.0.3.tar.gz", "has_sig": false, "md5_digest": "86b47432f0ad021f92a0c10662bf914d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19017314, "upload_time": "2012-01-11T11:27:54", "url": "https://files.pythonhosted.org/packages/e8/f2/a8492325f64824572e49c6117bee3d417fc0d5b683a0b5309cd6b19297d6/django-geoip-utils-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8edd2ec9c7e41d503e77021bccc2c0e6", "sha256": "784db574ae3c5882cfdefdffa125b70a92cc7835545358f201136bb454340028" }, "downloads": -1, "filename": "django-geoip-utils-0.0.4.tar.gz", "has_sig": false, "md5_digest": "8edd2ec9c7e41d503e77021bccc2c0e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19017536, "upload_time": "2012-01-11T16:25:12", "url": "https://files.pythonhosted.org/packages/cb/e0/d9ff6fc9069b51ff6021220cc4583a37180e5af10b5d7644b05f8fa4eea6/django-geoip-utils-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "ea7745b075c1cb0a68aa904cb2a8371d", "sha256": "1fb10cc5eb4fb5c1914c203bc0f135a118eb77599ee23551365a46949686b92a" }, "downloads": -1, "filename": "django-geoip-utils-0.0.5.tar.gz", "has_sig": false, "md5_digest": "ea7745b075c1cb0a68aa904cb2a8371d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19017514, "upload_time": "2012-02-08T11:38:42", "url": "https://files.pythonhosted.org/packages/91/1a/158cdb34f4284a63d1d10172aa0931e303b3cf88d4c3b399726a2ce06bff/django-geoip-utils-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "6cc34d76caf02c12ec1c5c3572177616", "sha256": "6d3a204e46e96b916193c7641b8db0d53266ca8b4a3a1f1d9a6680104da1785c" }, "downloads": -1, "filename": "django-geoip-utils-0.0.6.tar.gz", "has_sig": false, "md5_digest": "6cc34d76caf02c12ec1c5c3572177616", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18802382, "upload_time": "2013-01-31T08:40:14", "url": "https://files.pythonhosted.org/packages/de/c2/3ec727aa6445c206f4f18e71b0aceb0d22580dbbead1e931a59a547abffd/django-geoip-utils-0.0.6.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "1597d76220ccd125c29b0a7e7f45ef6e", "sha256": "8f61e235a2274110e89e98cae0b6cec5fe58def77629a3620e0555eee03c34ef" }, "downloads": -1, "filename": "django-geoip-utils-0.1.tar.gz", "has_sig": false, "md5_digest": "1597d76220ccd125c29b0a7e7f45ef6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12423750, "upload_time": "2013-02-04T17:20:33", "url": "https://files.pythonhosted.org/packages/9b/31/1539afc2d3a71db7a9b40c14e6752849cfbad998288dc21d7a13c82ba9ab/django-geoip-utils-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "a4d9aa906eb41d395eef8e35ba32b45d", "sha256": "29e47a4a4be283c8b80db5c72820325686b7130a9cd4294bc0b1ab8269c99002" }, "downloads": -1, "filename": "django-geoip-utils-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a4d9aa906eb41d395eef8e35ba32b45d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12423927, "upload_time": "2013-02-05T10:10:18", "url": "https://files.pythonhosted.org/packages/3a/33/a7c5c7d80dadad2d50bdf82ceed4273b0ad31d52a8dcb5205de26e4c92b3/django-geoip-utils-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4d9aa906eb41d395eef8e35ba32b45d", "sha256": "29e47a4a4be283c8b80db5c72820325686b7130a9cd4294bc0b1ab8269c99002" }, "downloads": -1, "filename": "django-geoip-utils-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a4d9aa906eb41d395eef8e35ba32b45d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12423927, "upload_time": "2013-02-05T10:10:18", "url": "https://files.pythonhosted.org/packages/3a/33/a7c5c7d80dadad2d50bdf82ceed4273b0ad31d52a8dcb5205de26e4c92b3/django-geoip-utils-0.1.1.tar.gz" } ] }