Skip to main content

Helps download and keep updated maxmind's geoip db required for django GeoIP

Project description

Helps download and keep updated maxmind’s geoip db required for django GeoIP

For Django 2.2+ and python 3.6+. For older versions use pip install django-geoipdb-loader<1.0.

Why and when to use?

If you don’t mind installing and configuring official geoipupdate on your server then I’d recommend to use it. If you want a simple method to download db files via django command or schedule updates using celery then this app is the way to go.

Installation

Using pip:

pip install django-geoipdb-loader

Add the app to INSTALLED_APPS and configure GEOIP_PATH:

INSTALLED_APPS = [
    ...
    geoipdb_loader,
    ...
]

GEOIP_PATH = '/myproject/geoip'
MAXMIND_LICENSE_KEY = 'your license key'

Usage

Run manage.py download_geoipdb to download geoip files.

In order to automatically update the geoip files you can use provided celery task:

CELERYBEAT_SCHEDULE = {
    'update-geoipdb': {
        'task': 'geoipdb_loader.tasks.update_geoipdb',
        'schedule': crontab(day_of_week=6),
    },
}

or crontab:

* * * * 6 manage.py download_geoipdb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-geoipdb-loader-1.0.0.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

django_geoipdb_loader-1.0.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file django-geoipdb-loader-1.0.0.tar.gz.

File metadata

  • Download URL: django-geoipdb-loader-1.0.0.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9

File hashes

Hashes for django-geoipdb-loader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2e087b1bf25133f8c454778bcc335d0e1a78d77c3e172b47d2727b1c3a934f6c
MD5 0b05268638fdc97ed108053d68071c1f
BLAKE2b-256 b6b7eb6d4e8c158139726f5595ede92be2bef5ea52f0ce41e02087fcd4f67c22

See more details on using hashes here.

File details

Details for the file django_geoipdb_loader-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: django_geoipdb_loader-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.9

File hashes

Hashes for django_geoipdb_loader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1deb4e95fafc082cf563285c4e9a16aff710edec29581010a0b1eec091e6fbe
MD5 00a55395e94c83a84058ce56d6b5ec11
BLAKE2b-256 4a932a25955fefd9e30e5faa8a26773e0d31fdc90b555ed68fd50a3df3556cfd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page