Profanity filter, based on Shutterstock dictionary
Project description
LeoProfanity
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.
Source Distribution
leoprofanity-0.0.2.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for leoprofanity-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c53e17c6ce9f93c0a1d412c06f5881b76ab8cec9b5314b4d8d5d74946ed5da00 |
|
MD5 | 7cb9b1c1da342587590848a518982202 |
|
BLAKE2b-256 | 035534c35bebaec1671123fa9b7def6e0e4edaf3216e23265583a4558fc035cd |