Skip to main content

Profanity filter, based on Shutterstock dictionary

Project description

LeoProfanity

Travis

Python version of leo-profanity, "Shutterstock" dictionary based filter.

Installation

pip install leoprofanity

# or
git clone https://github.com/jojoee/leo-profanity-python
cd leo-profanity-python
python setup.py install

Usage

CLI

python -m leoprofanity "I have boob"

Python

from leoprofanity import LeoProfanity

fil = LeoProfanity()
fil.check("I have BoOb, etc.")
fil.clean("I have BoOb, etc.")

Contribution

# env
conda env list
conda create --name leoprofanity python=3.7

# test
python -m unittest tests/*.py # run unit test

# format
flake8 --max-line-length=120 --exclude=__*.py
black . --check
pytype ./leoprofanity

# publishing
pip install twine # package for publishing
python setup.py sdist bdist_wheel # build the package
tar tzf dist/leoprofanity-0.0.1.tar.gz # check published file in the published package
twine check dist/* # if the package render correctly
python -m pip install dist/leoprofanity-0.0.1-py3-none-any.whl # for testing, install local to global
python -m leoprofanity "I have boob, etc." # testing the package via cli
twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose # publishing (test)
twine upload dist/* # publishing
pip install leoprofanity -U # force update module to test after publishing

Project details


Download files

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

Files for leoprofanity, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size leoprofanity-0.0.3-py3-none-any.whl (6.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size leoprofanity-0.0.3.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page