{ "info": { "author": "Kevin Dious", "author_email": "kdious@yahoo.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "PurgoMalum Client\n=================\n\nThis is a Python client for the\n`PurgoMalum `__ web service.\n\nInstallation\n------------\n\n::\n\n pip install purgomalum\n\nor\n\n::\n\n python setup.py install\n\nUsage\n-----\n\nTo use the basic filtering you can call the ``contains_profanity`` or\nthe ``retrieve_filtered_text`` methods from the client:\n\n::\n\n >>> from purgo_malum import client\n >>> client.contains_profanity('You are an @a$$hole')\n True\n\n >>> client.retrieve_filtered_text('You are an @a$$hole')\n u'You are an ********'\n\nThe client functions also support adding words to the profanity list,\nsetting your own filter text, and setting your own filter characters:\n\n::\n\n >>> from purgo_malum import client\n >>> client.contains_profanity('You are a good friend', add='you')\n True\n\n >>> client.retrieve_filtered_text('You are a good friend', add='you,are', fill_text='[filtered]')\n u'[filtered] [filtered] a good friend'\n\n >>> client.retrieve_filtered_text('You are a good friend', add='you,are', fill_char='|')\n u'||| ||| a good friend'\n\nYou can also get the raw data that the PurgoMalum API returns by calling\nthe ``raw`` version of the APIs:\n\n::\n\n >>> from purgo_malum import client\n >>> client.retrieve_filtered_text_raw('You are an @a$$hole', 'json')\n {u'result': u'You are an ********'}\n >>> client.retrieve_filtered_text_raw('You are an @a$$hole', 'plain')\n u'You are an ********'\n >>> client.retrieve_filtered_text_raw('You are an @a$$hole', 'xml')\n u'You are an ********'\n\nThis can be helpful in the event that the API changes and/or you feel\nyou can use the raw data in some manner.\n\nYou can also see the URL that is created for a specific request by using\nthe ``build_url`` method (mainly helpful for testing):\n\n::\n\n >>> client.build_url('test text', 'json', add='test', fill_text='[filtered]')\n u'https://www.purgomalum.com/service/json?text=test+text&add=test&fill_text=%5Bfiltered%5D'\n\nTesting\n-------\n\nTests have been for python 2.7 and python 3 using ``pytest``. The unit\ntests do call the actual PurgoMalum production API in order to test\nagainst potential API changes.\n\nBefore running tests make sure to install\n`pytest `__,\n`pytest-cov `__,\n`pytest-mock `__, and\n`mock `__ (already included in\n`requirements.txt `__).\n\nTo execute the tests and generate a code coverage report run the\nfollowing:\n\n::\n\n pytest --cov-report term-missing --cov=purgo_malum/\n\nYou should see:\n\n::\n\n Name Stmts Miss Cover Missing\n -------------------------------------------------------\n purgo_malum/__init__.py 0 0 100%\n purgo_malum/client.py 54 0 100%\n -------------------------------------------------------\n TOTAL 54 0 100%\n\nMiscellaneous\n-------------\n\nThis is my first offering to the open source community. If you see any\nissues with this client library and/or potential improvements please let\nme know and I will make the necessary updates.\n\nDonation\n--------\n\nIf this is helpful to you in any please consider a small donation.\n\n|paypal|\n\n.. |paypal| image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif\n :target: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GFDDW292XZVDJ&source=url", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/kdious/purgomalum-python/tarball/1.0.3", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kdious/purgomalum-python", "keywords": "profanity,filter,PurgoMalum,purgomalum,purgo_malum,purgo-malum,Purgo Malum", "license": "", "maintainer": "", "maintainer_email": "", "name": "PurgoMalum", "package_url": "https://pypi.org/project/PurgoMalum/", "platform": "", "project_url": "https://pypi.org/project/PurgoMalum/", "project_urls": { "Download": "https://github.com/kdious/purgomalum-python/tarball/1.0.3", "Homepage": "https://github.com/kdious/purgomalum-python" }, "release_url": "https://pypi.org/project/PurgoMalum/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "A python client for the PurgoMalum profanity filter web service", "version": "1.0.3" }, "last_serial": 5908121, "releases": { "1.0.3": [ { "comment_text": "", "digests": { "md5": "70e35279a9ad7621026fd333d76829af", "sha256": "0addb2d753f2f5af0a1d73578ccbe049a176bc1d96e3c21877dba96df86fbc5d" }, "downloads": -1, "filename": "PurgoMalum-1.0.3.tar.gz", "has_sig": false, "md5_digest": "70e35279a9ad7621026fd333d76829af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5321, "upload_time": "2019-09-30T17:36:01", "url": "https://files.pythonhosted.org/packages/ba/b6/9feb9f7101509b8aae0ec928bd5de0534ce591a1fd87b2851152a50f03fa/PurgoMalum-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "70e35279a9ad7621026fd333d76829af", "sha256": "0addb2d753f2f5af0a1d73578ccbe049a176bc1d96e3c21877dba96df86fbc5d" }, "downloads": -1, "filename": "PurgoMalum-1.0.3.tar.gz", "has_sig": false, "md5_digest": "70e35279a9ad7621026fd333d76829af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5321, "upload_time": "2019-09-30T17:36:01", "url": "https://files.pythonhosted.org/packages/ba/b6/9feb9f7101509b8aae0ec928bd5de0534ce591a1fd87b2851152a50f03fa/PurgoMalum-1.0.3.tar.gz" } ] }