{ "info": { "author": "Piotr Rusin", "author_email": "piotr.rusin88@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4" ], "description": "spam-lists\n==========\n\nA library for querying custom and third party web address blacklists and\nwhitelists.\n\nFeatures\n--------\n\n- client classes for `Google Safe Browsing Lookup API`_ and hpHosts_\n services\n- support for custom DNSBL service clients\n- preconfigured clients for SURBL_, `Spamhaus ZEN`_ and `Spamhaus DBL`_\n- support for querying and populating custom host whitelists and blacklists\n- combining multiple URL testers into a composite tester\n- optional querying for redirect URL addresses when using a composite\n URL tester\n- support for Python 2 and 3\n\n.. _Google Safe Browsing Lookup API: https://developers.google.com/\n safe-browsing/v3/lookup-guide\n.. _hpHosts: https://www.hosts-file.net/\n.. _SURBL: http://www.surbl.org/lists#multi\n.. _Spamhaus ZEN: https://www.spamhaus.org/zen/\n.. _Spamhaus DBL: https://www.spamhaus.org/dbl/\n\nUsage\n-----\n\nSimple test for membership of a host value in a host blacklist:\n\n.. code:: python\n\n >>> from spam_lists import SPAMHAUS_DBL\n >>> 'dbltest.com' in SPAMHAUS_DBL\n True\n\n:code:`lookup(host_value)` method returns a named tuple containing:\n\n- a listed host that is a parent of a searched domain, or a listed ip address\n equal to one searched in the blacklist\n- source of the returned information as an instance of the client used\n to search for the value\n- a set of classificiation terms associated with the value\n\n.. code:: python\n\n >>> SPAMHAUS_DBL.lookup('dbltest.com')\n AddressListItem(value=u'dbltest.com', ...)\n\nTesting if there is any spam URL in a sequence:\n\n.. code:: python\n\n >>> urls_to_test = (\n 'http://google.com',\n 'http://wikipedia.org',\n 'http://dbltest.com'\n )\n >>> SPAMHAUS_DBL.any_match(urls_to_test)\n True\n\nFiltering recognized spam URLs out of a sequence of values returns a\ngenerator object that yields the spam URLs:\n\n.. code:: python\n\n >>> result = SPAMHAUS_DBL.filter_matching(urls_to_test)\n >>> result\n at 0xb4f60a7c>\n >>> list(result)\n ['http://dbltest.com']\n\nCalling :code:`lookup_matching(urls)` returns a generator object yielding\ninstances of the AddressListItem named tuple for matching URLs:\n\n.. code:: python\n\n >>> result = SPAMHAUS_DBL.lookup_matching(urls_to_test)\n >>> result\n \n >>> list(result)\n [AddressListItem(value=u'dbltest.com', ...)]\n\nFor further information, read `spam_lists package docstring`__.\n\n.. __: https://github.com/piotr-rusin/spam-lists/\n blob/master/spam_lists/__init__.py\n\nInstallation\n------------\n\nInstall using pip:\n\n.. code:: bash\n\n $ pip install spam-lists\n\nTo be able to run tests, install test extras:\n\n.. code:: bash\n\n $ pip install spam-lists[test]\n\nLicense\n-------\n\n| MIT\n| See LICENSE__\n\n.. __: https://github.com/piotr-rusin/spam-lists/blob/master/LICENSE", "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/piotr-rusin/spam-lists", "keywords": "spam dnsbl surbl google-safe-browsing-api spamhaus whitelist blacklist", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "spam-lists", "package_url": "https://pypi.org/project/spam-lists/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/spam-lists/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/piotr-rusin/spam-lists" }, "release_url": "https://pypi.org/project/spam-lists/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Web address blacklist/whitelist library for Python", "version": "1.0.0" }, "last_serial": 2350788, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "448534c31f06a7fd85ed8c808d490df3", "sha256": "956e6a6364904a5bc06d8772f87dcd9c9783ef29f3fcb5f3990d06b370b329dd" }, "downloads": -1, "filename": "spam-lists-1.0.0.tar.gz", "has_sig": false, "md5_digest": "448534c31f06a7fd85ed8c808d490df3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30774, "upload_time": "2016-09-19T13:20:07", "url": "https://files.pythonhosted.org/packages/16/f1/9c6b31a486f87d4f20c73acf47c8abeff8801970d71ac7f409ad03e67d59/spam-lists-1.0.0.tar.gz" } ], "1.0.0b2": [ { "comment_text": "", "digests": { "md5": "eeb3a7917416bc5bf96187c13aceeaf4", "sha256": "d200d60e411f49ec045297cfc67ac582b636a997e947ab8ed702c9b77b0b436f" }, "downloads": -1, "filename": "spam-lists-1.0.0b2.tar.gz", "has_sig": false, "md5_digest": "eeb3a7917416bc5bf96187c13aceeaf4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30310, "upload_time": "2016-07-04T07:28:10", "url": "https://files.pythonhosted.org/packages/66/f8/92773fff9d67c912739adaf463a8437ea193de25e6d6078784f0e876fbea/spam-lists-1.0.0b2.tar.gz" } ], "1.0.0b3": [ { "comment_text": "", "digests": { "md5": "d77d137762c2403f2314a2517307a0c0", "sha256": "fa67786b32c7df69e050b7aa67bedd5797f922af6953e3e14591f81497d950e0" }, "downloads": -1, "filename": "spam-lists-1.0.0b3.tar.gz", "has_sig": false, "md5_digest": "d77d137762c2403f2314a2517307a0c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30710, "upload_time": "2016-07-04T09:22:22", "url": "https://files.pythonhosted.org/packages/76/57/8013358152f7914a1c6a9d5ca0c058b01b9cc4bd89469fba8d217358c98d/spam-lists-1.0.0b3.tar.gz" } ], "1.0.0b4": [ { "comment_text": "", "digests": { "md5": "a677a6a3df5e093a941ff92fb2ae902c", "sha256": "a1755f0cd63d9a12400ebaa8aadd40f32b3ded70ac59fce0ff7cecd73ee58355" }, "downloads": -1, "filename": "spam-lists-1.0.0b4.tar.gz", "has_sig": false, "md5_digest": "a677a6a3df5e093a941ff92fb2ae902c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30433, "upload_time": "2016-07-04T12:22:39", "url": "https://files.pythonhosted.org/packages/d4/69/dde2a2a390427d19facd4f3285af269eb879113a781b6c7726843d041b59/spam-lists-1.0.0b4.tar.gz" } ], "1.0.0b5": [ { "comment_text": "", "digests": { "md5": "2d6eee9f5c65cc42db5613e41d44d8b3", "sha256": "7b20cb1a6abd8b81c87aa0fd8bb64c3e5fd6958ae58a1edf41653443b2e9531e" }, "downloads": -1, "filename": "spam-lists-1.0.0b5.tar.gz", "has_sig": false, "md5_digest": "2d6eee9f5c65cc42db5613e41d44d8b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30542, "upload_time": "2016-07-09T18:21:51", "url": "https://files.pythonhosted.org/packages/68/76/9266051271c65f35373991d5fb3e314599d61ea3f50e4667d6c7d3497961/spam-lists-1.0.0b5.tar.gz" } ], "1.0.0b6": [ { "comment_text": "", "digests": { "md5": "03f97892e17d1aa357b3fea2cdab7cf1", "sha256": "fd0b3f3a7734323b1f0f541af884516fa861f834e96e4e4981eeef695bad5e9c" }, "downloads": -1, "filename": "spam-lists-1.0.0b6.tar.gz", "has_sig": false, "md5_digest": "03f97892e17d1aa357b3fea2cdab7cf1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30537, "upload_time": "2016-07-09T18:34:27", "url": "https://files.pythonhosted.org/packages/57/62/ddc79a23515e914fb1a397e3deb5af9dbf30bbb43fd93ad4bebd43fb7d85/spam-lists-1.0.0b6.tar.gz" } ], "1.0.0b7": [ { "comment_text": "", "digests": { "md5": "9a6a9161b43ea009bd0914df5dbe42e6", "sha256": "442dca62e32a5e8326a6f962e5dd0d7348d3cdbcd80117acb97e6616e52b124b" }, "downloads": -1, "filename": "spam-lists-1.0.0b7.tar.gz", "has_sig": false, "md5_digest": "9a6a9161b43ea009bd0914df5dbe42e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30549, "upload_time": "2016-07-10T07:17:29", "url": "https://files.pythonhosted.org/packages/92/18/400100aa248349ed87584281e230b725a38c32a92b346ea7836e3db6e30b/spam-lists-1.0.0b7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "448534c31f06a7fd85ed8c808d490df3", "sha256": "956e6a6364904a5bc06d8772f87dcd9c9783ef29f3fcb5f3990d06b370b329dd" }, "downloads": -1, "filename": "spam-lists-1.0.0.tar.gz", "has_sig": false, "md5_digest": "448534c31f06a7fd85ed8c808d490df3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30774, "upload_time": "2016-09-19T13:20:07", "url": "https://files.pythonhosted.org/packages/16/f1/9c6b31a486f87d4f20c73acf47c8abeff8801970d71ac7f409ad03e67d59/spam-lists-1.0.0.tar.gz" } ] }