{ "info": { "author": "jmz", "author_email": "jmz-b@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "=============================\nDjango Middlewall\n=============================\n\n.. image:: https://badge.fury.io/py/django-middlewall.svg\n :target: https://badge.fury.io/py/django-middlewall\n\n.. image:: https://travis-ci.org/jmz-b/django-middlewall.svg?branch=master\n :target: https://travis-ci.org/jmz-b/django-middlewall\n\n.. image:: https://codecov.io/gh/jmz-b/django-middlewall/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/jmz-b/django-middlewall\n\nSimple middleware for blocking requests by IP Address\n\n\nQuickstart\n----------\n\nInstall Django Middlewall::\n\n pip install django-middlewall\n\nAdd it to your `INSTALLED_APPS`:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n ...\n 'middlewall.apps.MiddlewallConfig',\n ...\n )\n\nEnable middleware components:\n\n.. code-block:: python\n\n # enable both white and black listing\n\n MIDDLEWARE = [\n 'middlewall.middleware.BlacklistMiddleware',\n 'middlewall.middleware.WhitelistMiddleware',\n ...\n ]\n\nDefine access lists in CIDR notation:\n\n.. code-block:: python\n\n # only allow requests from these subnets\n\n MIDDLEWALL_WHITELIST = ['192.0.2.0/24', '198.51.100.0/24']\n\n # also block this specific address\n\n MIDDLEWALL_BLACKLIST = ['192.0.2.1/32']\n\n(optional) Define a custom function to get remote addresses from request\nobjects:\n\n.. code-block:: python\n\n # take advantage of the X_FORWARDED_FOR support in ipware\n\n MIDDLEWALL_ADDRESS_GETTER = 'ipware.ip.get_ip'\n\n\nRunning Tests\n-------------\n\n::\n\n source /bin/activate\n (myenv) $ pip install -e .[test]\n (myenv) $ pip install tox\n (myenv) $ tox\n\n\nCredits\n-------\n\n* Cookiecutter_\n* `cookiecutter-djangopackage`_\n* ipware_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n.. _ipware: https://github.com/un33k/django-ipware\n\n\n\n\nHistory\n-------\n\n0.1.2 (2017-03-09)\n++++++++++++++++++\n\n* General code clean up.\n\n0.1.1 (2017-03-09)\n++++++++++++++++++\n\n* First release.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jmz-b/django-middlewall", "keywords": "django-middlewall", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "django-middlewall", "package_url": "https://pypi.org/project/django-middlewall/", "platform": "", "project_url": "https://pypi.org/project/django-middlewall/", "project_urls": { "Homepage": "https://github.com/jmz-b/django-middlewall" }, "release_url": "https://pypi.org/project/django-middlewall/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Simple middleware for filtering requests by their source IP address", "version": "0.1.2" }, "last_serial": 2695490, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "955ce2f2924deb91d3ab7a6ac4655d8e", "sha256": "cbeede1c5dfa60431558705d5518188709c5e5d62607b531b0e945720837e80d" }, "downloads": -1, "filename": "django_middlewall-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "955ce2f2924deb91d3ab7a6ac4655d8e", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6381, "upload_time": "2017-03-09T22:38:26", "url": "https://files.pythonhosted.org/packages/35/a3/733794bbf3793f4a956cf672eb40f2542c4bc4b3ca6df46fa7531c11e40f/django_middlewall-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50e4adf7b2bbe3c40a65155cda784019", "sha256": "d3bcb4f4e56cd65cc9be3ab14e9b0106a62a3b640d223309e119cc6547b9f57e" }, "downloads": -1, "filename": "django-middlewall-0.1.1.tar.gz", "has_sig": false, "md5_digest": "50e4adf7b2bbe3c40a65155cda784019", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6431, "upload_time": "2017-03-09T22:38:23", "url": "https://files.pythonhosted.org/packages/ea/72/c663e52050aed3d51e0996d13eaa2f5f0c713e25f7f265ee5d4e3248b968/django-middlewall-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "e8e712078d38e071a548529d6561e905", "sha256": "4d57ae1df5f07d5bf2e81be86b9e7732f56b6d9c627a8e1f8b8c231b3182eaf2" }, "downloads": -1, "filename": "django_middlewall-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e8e712078d38e071a548529d6561e905", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5429, "upload_time": "2017-03-09T22:48:59", "url": "https://files.pythonhosted.org/packages/a7/27/b05bed9e82b54fec0df0783a11d0d8cab4528a71402629dd482e74a0b7ef/django_middlewall-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a133d41b319b6eee590868dffcf7f1b8", "sha256": "91033c4e5cf41d234d39dfbf06cba2381bc6e6895ce818e158cfe2bf0edc28a0" }, "downloads": -1, "filename": "django-middlewall-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a133d41b319b6eee590868dffcf7f1b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5942, "upload_time": "2017-03-09T22:48:56", "url": "https://files.pythonhosted.org/packages/f9/d0/630c8dfab2d89890e684f124446fa406be0b97aa146929eb9cd01c3877d3/django-middlewall-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e8e712078d38e071a548529d6561e905", "sha256": "4d57ae1df5f07d5bf2e81be86b9e7732f56b6d9c627a8e1f8b8c231b3182eaf2" }, "downloads": -1, "filename": "django_middlewall-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e8e712078d38e071a548529d6561e905", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 5429, "upload_time": "2017-03-09T22:48:59", "url": "https://files.pythonhosted.org/packages/a7/27/b05bed9e82b54fec0df0783a11d0d8cab4528a71402629dd482e74a0b7ef/django_middlewall-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a133d41b319b6eee590868dffcf7f1b8", "sha256": "91033c4e5cf41d234d39dfbf06cba2381bc6e6895ce818e158cfe2bf0edc28a0" }, "downloads": -1, "filename": "django-middlewall-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a133d41b319b6eee590868dffcf7f1b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5942, "upload_time": "2017-03-09T22:48:56", "url": "https://files.pythonhosted.org/packages/f9/d0/630c8dfab2d89890e684f124446fa406be0b97aa146929eb9cd01c3877d3/django-middlewall-0.1.2.tar.gz" } ] }