App to figure out where your visitors are from by their IP address. Based on default DB or Redis.

gotlium, updated 🕥 2022-07-07 22:58:31

Django-GeoIP-Redis

.. image:: https://api.travis-ci.org/gotlium/django-geoip-redis.png?branch=master :alt: Build Status :target: https://travis-ci.org/gotlium/django-geoip-redis .. image:: https://coveralls.io/repos/gotlium/django-geoip-redis/badge.png?branch=master :target: https://coveralls.io/r/gotlium/django-geoip-redis?branch=master .. image:: https://pypip.in/v/django-geoip-redis/badge.png :alt: Current version on PyPi :target: https://crate.io/packages/django-geoip-redis/ .. image:: https://pypip.in/d/django-geoip-redis/badge.png :alt: Downloads from PyPi :target: https://crate.io/packages/django-geoip-redis/

Documentation available at Read the Docs <http://django-geoip-redis.readthedocs.org/>_.

Demo installation:

.. code-block:: bash

$ sudo apt-get install redis-server virtualenvwrapper
$ mkvirtualenv django-geoip-redis
$ git clone https://github.com/gotlium/django-geoip-redis.git
$ cd django-geoip-redis
$ pip install -r requirements/package.txt
$ python setup.py develop
$ cd demo
$ pip install -r requirements.txt
$ python manage.py syncdb --noinput
$ python manage.py migrate
$ python manage.py loaddata ../fixtures/db.json
$ python manage.py shell

.. code-block:: python

>>> from geoip.geo import record_by_ip_as_dict
>>> print (record_by_ip_as_dict('91.195.136.52'))

If you want use native db for local development, you can add GEO_BACKEND = 'db' into local_settings.py

Performance:

  • django-geoip-redis:

    • MySQL(SSD): 728 rps
    • SQLite(SSD): 46 rps
    • Redis: 3548 rps
  • django-geoip(no isp, no provider):

    • MySQL(SSD): 855 rps
    • SQLite(SSD): 47 rps
  • django.contrib.gis.geoip.GeoIP(no isp, no provider, but C API):

    • standard: 4666 rps
    • memory: 73 rps
    • check: 4510 rps
    • index: 76 rps
    • mmap: 4425 rps

Tested on Ubuntu 12.04(x86_64), Django(1.6), uWSGI(1.0.3), Nginx(1.1.19) with Apache Benchmark:

.. code-block:: bash

$ ab -c 100 -n 1000 http://localhost/ip/91.195.136.52/

| On tests used default configuration for Redis & MySQL without any modifications. | | Demo page available here <http://geoip-gotlium.rhcloud.com/ip/91.195.136.52/>_.

Compatibility:

  • Python: 2.6, 2.7, 3.3
  • Django: 1.3.x, 1.4.x, 1.5.x, 1.6

.. image:: https://d2weczhvl823v0.cloudfront.net/gotlium/django-geoip-redis/trend.png :alt: Bitdeli badge :target: https://bitdeli.com/free

Issues

Bump requests from 2.0.1 to 2.20.0 in /requirements

opened on 2022-07-07 22:58:31 by dependabot[bot]

Bumps requests from 2.0.1 to 2.20.0.

Changelog

Sourced from requests's changelog.

2.20.0 (2018-10-18)

Bugfixes

  • Content-Type header parsing is now case-insensitive (e.g. charset=utf8 v Charset=utf8).
  • Fixed exception leak where certain redirect urls would raise uncaught urllib3 exceptions.
  • Requests removes Authorization header from requests redirected from https to http on the same hostname. (CVE-2018-18074)
  • should_bypass_proxies now handles URIs without hostnames (e.g. files).

Dependencies

  • Requests now supports urllib3 v1.24.

Deprecations

  • Requests has officially stopped support for Python 2.6.

2.19.1 (2018-06-14)

Bugfixes

  • Fixed issue where status_codes.py's init function failed trying to append to a __doc__ value of None.

2.19.0 (2018-06-12)

Improvements

  • Warn user about possible slowdown when using cryptography version < 1.3.4
  • Check for invalid host in proxy URL, before forwarding request to adapter.
  • Fragments are now properly maintained across redirects. (RFC7231 7.1.2)
  • Removed use of cgi module to expedite library load time.
  • Added support for SHA-256 and SHA-512 digest auth algorithms.
  • Minor performance improvement to Request.content.
  • Migrate to using collections.abc for 3.7 compatibility.

Bugfixes

  • Parsing empty Link headers with parse_header_links() no longer return one bogus entry.

... (truncated)

Commits
  • bd84045 v2.20.0
  • 7fd9267 remove final remnants from 2.6
  • 6ae8a21 Add myself to AUTHORS
  • 89ab030 Use comprehensions whenever possible
  • 2c6a842 Merge pull request #4827 from webmaven/patch-1
  • 30be889 CVE URLs update: www sub-subdomain no longer valid
  • a6cd380 Merge pull request #4765 from requests/encapsulate_urllib3_exc
  • bbdbcc8 wrap url parsing exceptions from urllib3's PoolManager
  • ff0c325 Merge pull request #4805 from jdufresne/https
  • b0ad249 Prefer https:// for URLs throughout project
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/gotlium/django-geoip-redis/network/alerts).

Bump ipython from 1.1.0 to 7.16.3 in /demo

opened on 2022-01-21 19:24:25 by dependabot[bot]

Bumps ipython from 1.1.0 to 7.16.3.

Release notes

Sourced from ipython's releases.

7.9.0

No release notes provided.

7.8.0

No release notes provided.

7.7.0

No release notes provided.

7.6.1

No release notes provided.

7.6.0

No release notes provided.

7.5.0

No release notes provided.

7.4.0

No release notes provided.

7.3.0

No release notes provided.

7.2.0

No release notes provided.

7.1.1

No release notes provided.

7.1.0

No release notes provided.

7.0.1

No release notes provided.

7.0.0

No release notes provided.

7.0.0-doc

No release notes provided.

7.0.0rc1

No release notes provided.

7.0.0b1

No release notes provided.

6.2.1

No release notes provided.

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/gotlium/django-geoip-redis/network/alerts).

Bump django from 1.6 to 2.2.24 in /demo

opened on 2021-06-10 19:14:11 by dependabot[bot]

Bumps django from 1.6 to 2.2.24.

Commits
  • 2da029d [2.2.x] Bumped version for 2.2.24 release.
  • f27c38a [2.2.x] Fixed CVE-2021-33571 -- Prevented leading zeros in IPv4 addresses.
  • 053cc95 [2.2.x] Fixed CVE-2021-33203 -- Fixed potential path-traversal via admindocs'...
  • 6229d87 [2.2.x] Confirmed release date for Django 2.2.24.
  • f163ad5 [2.2.x] Added stub release notes and date for Django 2.2.24.
  • bed1755 [2.2.x] Changed IRC references to Libera.Chat.
  • 63f0d7a [2.2.x] Refs #32718 -- Fixed file_storage.test_generate_filename and model_fi...
  • 5fe4970 [2.2.x] Post-release version bump.
  • 61f814f [2.2.x] Bumped version for 2.2.23 release.
  • b8ecb06 [2.2.x] Fixed #32718 -- Relaxed file name validation in FileField.
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/gotlium/django-geoip-redis/network/alerts).

Bump werkzeug from 0.9.4 to 0.15.3 in /demo

opened on 2019-10-22 23:55:39 by dependabot[bot]

Bumps werkzeug from 0.9.4 to 0.15.3.

Release notes *Sourced from [werkzeug's releases](https://github.com/pallets/werkzeug/releases).* > ## 0.15.3 > * Blog: https://palletsprojects.com/blog/werkzeug-0-15-3-released/ > * Changes: https://werkzeug.palletsprojects.com/en/0.15.x/changes/#version-0-15-3 > > > ## 0.15.2 > * Blog: https://palletsprojects.com/blog/werkzeug-0-15-2-released/ > * Changes: https://werkzeug.palletsprojects.com/en/0.15.x/changes/#version-0-15-2 > > ## 0.15.1 > * Blog: https://palletsprojects.com/blog/werkzeug-0-15-1-released/ > * Changes: https://werkzeug.palletsprojects.com/en/0.15.x/changes/ > > ## 0.15.0 > * Blog: https://palletsprojects.com/blog/werkzeug-0-15-0-released/ > * Changes: https://werkzeug.palletsprojects.com/en/0.15.x/changes/ > > ## 0.13 > [Read the announcement here.](https://www.palletsprojects.com/blog/werkzeug-013-released/) > > [Read the full changelog.](http://werkzeug.pocoo.org/docs/latest/changes/#version-0-13) > > Install from [PyPI](https://pypi.org/Werkzeug/0.13) with pip: > > ``` > pip install -U Werkzeug > ``` >
Changelog *Sourced from [werkzeug's changelog](https://github.com/pallets/werkzeug/blob/master/CHANGES.rst).* > Version 0.15.3 > -------------- > > Released 2019-05-14 > > - Properly handle multi-line header folding in development server in > Python 2.7. (:issue:`1080`) > - Restore the ``response`` argument to :exc:`~exceptions.Unauthorized`. > (:pr:`1527`) > - :exc:`~exceptions.Unauthorized` doesn't add the ``WWW-Authenticate`` > header if ``www_authenticate`` is not given. (:issue:`1516`) > - The default URL converter correctly encodes bytes to string rather > than representing them with ``b''``. (:issue:`1502`) > - Fix the filename format string in > :class:`~middleware.profiler.ProfilerMiddleware` to correctly handle > float values. (:issue:`1511`) > - Update :class:`~middleware.lint.LintMiddleware` to work on Python 3. > (:issue:`1510`) > - The debugger detects cycles in chained exceptions and does not time > out in that case. (:issue:`1536`) > - When running the development server in Docker, the debugger security > pin is now unique per container. > > > Version 0.15.2 > -------------- > > Released 2019-04-02 > > - ``Rule`` code generation uses a filename that coverage will ignore. > The previous value, "generated", was causing coverage to fail. > (:issue:`1487`) > - The test client removes the cookie header if there are no persisted > cookies. This fixes an issue introduced in 0.15.0 where the cookies > from the original request were used for redirects, causing functions > such as logout to fail. (:issue:`1491`) > - The test client copies the environ before passing it to the app, to > prevent in-place modifications from affecting redirect requests. > (:issue:`1498`) > - The ``"werkzeug"`` logger only adds a handler if there is no handler > configured for its level in the logging chain. This avoids double > logging if other code configures logging first. (:issue:`1492`) > > > Version 0.15.1 > -------------- > > Released 2019-03-21 > > - :exc:`~exceptions.Unauthorized` takes ``description`` as the first > ... (truncated)
Commits - [`9b1123a`](https://github.com/pallets/werkzeug/commit/9b1123a779e95b5c38ca911ce1329e87a3348a92) release version 0.15.3 - [`00bc43b`](https://github.com/pallets/werkzeug/commit/00bc43b1672e662e5e3b8cecd79e67fc968fa246) unique debugger pin in Docker containers - [`2cbdf2b`](https://github.com/pallets/werkzeug/commit/2cbdf2b02273daccf85845b1e1569096e65ffe58) Merge pull request [#1542](https://github-redirect.dependabot.com/pallets/werkzeug/issues/1542) from asottile/exceptions_arent_always_hashable - [`0e669f6`](https://github.com/pallets/werkzeug/commit/0e669f6be532801267d35de23c5f5237b8406d8a) Fix unhashable exception types - [`bdc17e4`](https://github.com/pallets/werkzeug/commit/bdc17e4cd10bbb17449006cef385ec953a11fc36) Merge pull request [#1540](https://github-redirect.dependabot.com/pallets/werkzeug/issues/1540) from pallets/break-tb-cycle - [`44e38c2`](https://github.com/pallets/werkzeug/commit/44e38c2985bcd3a7c17467bead901b8f36528f5f) break cycle in chained exceptions - [`777500b`](https://github.com/pallets/werkzeug/commit/777500b64647ea47b21e52e5e113ba1d86014c05) Merge pull request [#1518](https://github-redirect.dependabot.com/pallets/werkzeug/issues/1518) from NiklasMM/fix/1510_lint-middleware-python3-compa... - [`e00c7c2`](https://github.com/pallets/werkzeug/commit/e00c7c2cedcbcad3772e4522813c78bc9a860fbe) Make LintMiddleware Python 3 compatible and add tests - [`d590cc7`](https://github.com/pallets/werkzeug/commit/d590cc7cf2fcb34ebc0783eb3c2913e8ce016ed8) Merge pull request [#1539](https://github-redirect.dependabot.com/pallets/werkzeug/issues/1539) from pallets/profiler-format - [`0388fc9`](https://github.com/pallets/werkzeug/commit/0388fc95e696513bbefbde293f3f76cc482df8fa) update filename_format for ProfilerMiddleware. - Additional commits viewable in [compare view](https://github.com/pallets/werkzeug/compare/0.9.4...0.15.3)


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/gotlium/django-geoip-redis/network/alerts).

Switched broken pypip.in badges to shields.io

opened on 2018-03-05 00:41:25 by movermeyer

Hello, this is an auto-generated Pull Request. (Feedback?)

Some time ago, pypip.in shut down. This broke the badges for a bunch of repositories, including django-geoip-redis. Thankfully, an equivalent service is run by shields.io. This pull request changes the badges to use shields.io instead.

Unfortunately, PyPI has removed download statistics from their API, which means that even the shields.io "download count" badges are broken (they display "no longer available". See this). So those badges should really be removed entirely. Since this is an automated process (and trying to automatically remove the badges from READMEs can be tricky), this pull request just replaces the URL with the shields.io syntax.

GoTLiuM InSPiRiT
GitHub Repository