Saravanan666/pypi-org huggingface dataset:
Package: cleanmydata
cleanmydataThis library contains all the essential functions for data cleaning.It takes a list of data cleaning parameters and either a string or pandas dataframe as inputFunctions:Remove new linesRemove emailsRemove URLsRemove hashtags (#hashtag)Remove the string if it contains only numbersRemove mentions (@user)Remove retweets (RT...)Remove text between the square brackets [ ]Remove multiple whitespaces and replace with one whitespaceReplace characters with more than two occurrences and replace with one occurrenceRemove emojisCount characters (only for dataframe; creates a new column)Count words (only for dataframe; creates a new column)Calculate average word length (only for dataframe; creates a new column)Count stopwords (only for dataframe; creates two new columns, stowords and stopword_count)Detect language (usesfasttext-langdetect) (only for dataframe; creates two new columns, lang and lang_prob)Detect language (usesfasttext-langdetect) (only for dataframe; creates just one column with langauge and probability; takes less time)How to install?pip install cleanmydataParameterslst (list) - List of data cleaning operationsdata (string or dataframe) - Data to be passedcolumn (string) - Dataframe column on which operation to perform; only for dataframesave (boolean) - If you want to save the results in a new filename (string) - Name of the new file if save is TrueUsageImport the libraryfrom cleanmydata.functions import clean_dataCall the method clean_data, and pass the parameters as you wish.By default, if the dataframe is passed, it drops all NA values (dropna)ExamplesTo remove emails and hashtagsmydata = "Hello folks.abc@example.com#hashtag"mydata = clean_data(lst=[2, 4], data=mydata)print(mydata)To count stopwords, remove mentions, and URLs, and save file from a dataframedf = pd.read_csv('data/my_csv.csv', encoding='ISO-8859-1', dtype='unicode')df = clean_data(lst=[15, 6, 2], data=df, column='comments', save=True, name='my custome file name')Other notesIf using stopwords, make sure you have en_core_web_sm installed.python -m spacy download en_core_web_smMore options and enhancements coming soon...
Package: cleanmymac
cleanmymacA simple command line tool to clean old stuff from your mac.documentationhttp://cleanmymac.readthedocs.org/en/latest/usage$cleanmymac-hUsage:cleanmymac[OPTIONS]TARGETSthemain**run**method,responsibleforcreatingtheparserandexecutingthemainlogicin**cleanmymac**:paramboolupdate:performupdateoftargets(ifapplicable):paramdry_run:donotexecutetheactions,butlogtheresult:paramquiet:quietmode(nooutput),showaprogressbarinstead:paramstrict:ifsetenforcestrict(er)ruleswhenvalidatingtargets:paramlist_targets:listtheinstalledtargets:paramstop_on_error:aborttheexecutiononfirsterror:paramconfig:theconfigurationpath:paramtargets_path:extratargetspaths:paramtargets:thetargetsOptions:-L,--log-levelLVLEitherCRITICAL,ERROR,WARNING,INFOorDEBUG-u,--updateupdatethetargetifapplicable-d,--dry_rundescribetheactionstobeperformed,donotexecutethem-q,--quietruninquietmode--strict/--no-strictstrictmode:enforcestrict(er)ruleswhenvalidatingtargets-l,--listlistregisteredcleanuptargets-s,--stop_on_errorstopexecutionwhenfirsterrorisdetected-c,--configTEXTspecifytheconfigurationpath-t,--targets_pathPATHspecifyextrayamldefinedtargetspath--versionShowtheversionandexit.-?,-h,--helpShowthismessageandexit.a typical usage pattern is:$cleanmymacor (in quiet mode)$cleanmymac-qinstallationinstall from pypi:$pipinstallcleanmymacclone the repository locally and issue$pythonsetup.pyinstallconfigurationthecleanmymacutility accepts a configuration file by specifying the-coption. If not specified the file is assumed to be at the following
location~/.cleanmymac.yamlthe global configuration can be used (for now) to pass specific env vars
to shell commands, for example assume thatanacondais not in the main
path:cleanmymac:{targets_path:['.']}anaconda:{env:{PATH:'~/anaconda/bin',},}extensibilityone can add morecleanup targetseither by installing them as python
classes registered to the following entry-point:cleanmymac.targetlike this (in setup.py):entry_points={# ....'cleanmymac.target':['my_target_name = my.python.package.MyTargetClass']# ...}alternatively for shell based commands simply create yaml files with the
following schema:type:'cmd'spec:{update_commands:['brewupdate','brewoutdated|brewupgrade'],clean_commands:['brewcleanup']}or for cleaning up directories (removing all but the latest version):type:'dir'spec:{update_message:'GetthelatestMacTexversionfromhttps://www.tug.org/mactex/',entries:[{dir:'/usr/local/texlive/',pattern:'\d+'},]}note: see thecleanmymac.builtinsmodule for more detailsand pointcleanmymacto the folder where the yaml files reside with
the-tcommand line optionbuiltin targetsto see a list of builtin targets run:$cleanmymac-lcurrently the following are supported:homebrewjava jdkmactexanacondatrashdisclaimerI created this utility in the hope that others may find it useful, as I
found it annoying to always remember how and what to clean from my mac.
This is work in progress, so use at your own risk!
Package: clean-notebook
Clean up notebookA simple command to clean up your Jupyter notebooks.UsageIf you want to run this tool in a CLI,pipxis advised.pipxinstallclean-notebookTo useclean-notebookwithpre-commit, add this to your.pre-commit-config.yaml:-repo:https://github.com/hoxbro/clean_notebookrev:""# Use the sha / tag you want to point athooks:-id:clean-notebookConfigurationTo clean a notebook run the commandclean-notebook example.ipynbor if you want to do it for multiple filesclean-notebook example1.ipynb example2.ipynb.The following arguments are supported--dry-runto not overwrite the file and--keep-emptyto keep empty cells. If you want not to delete a specific metadata key, the-i/--ignoreargument can be used. If more keys should be ignored:clean-notebook . -i tags -i slideshow. If you want remove ending newlines in code cells, use the-s/--strip-trailing-newlinesargument.
Package: clean-pandas
Clean PandasPandas accessor for replacing, removing, or encrypting a DataFrame or Series that contains Personally Identifiable Information (PII) or Protected Health Information (PHI)DependenciesFakerScrubadubcryptographyInstallationpipinstallclean_pandasClean Type Optionsencrypt(default) - Utilizes thecryptographylibrary and uses Fernet (symmetric encryption)NOTE: You must use theserialize_encryption_keybefore ending your REPL or program in order to decryptfaker- Utilizes theFakerlibrary and requires user denote the Faker "fake" to usescrubadub- Utilizes theScrubadublibrary to detect and replace PIItruncate- Truncates the data by casting to a string, if possible, and recast to original type if possible.  ReturnsNoneif truncation is longer than the value length.  Returns the string value if cannot be cast back to original typeBasic Usage>>>fromclean_pandasimportCleanPandas>>>importpandasaspd>>>test_df=pd.DataFrame({"first_name":["Charles","Stephen"],"last_name":["Darwin","Hawking"],"ssn":["555-55-5555","123-45-6789"]})>>>result_df,encryption_key,dtype_dict=test_df.clean_pandas.encrypt('ssn')>>>result_df['ssn']0b'gAAAAABbextrtJcQfOt37HK7pEISBokuh9ndWwGhvZpv...1b'gAAAAABbextrHo7qFr6DIZ0FlvVyO73HOmOYujKsv6vS...Name:ssn,dtype:object>>>test_df.clean_pandas.fake_it('last_name',faker_type='first_name')['last_name']0Joshua1MichaelName:last_name,dtype:object>>>test_df.clean_pandas.scrub_it('ssn')['ssn']0{{SSN}}1{{SSN}}Name:ssn,dtype:object>>>test_df.clean_pandas.truncate('ssn',trunc_length=7,trunc_from_end=False)['ssn']0555516789Name:ssn,dtype:object# Decrypt a series>>>result_df,encryption_key,dtype_dict=test_df.clean_pandas.encrypt('ssn')# encrypt>>>test_df.some_id0b'gAAAAABblA1SIGqKbTC97RjEibmB4FBHnXqKVocvFMg4...1b'gAAAAABblA1Sc_StggFPj0zmQLUVo0ADqHQtljUEGcr0...Name:some_id,dtype:object# Automatically casts back to original dtype with optional dtype argument>>>result_df.clean_pandas.decrypt('some_id',encryption_key,dtype_dict)['some_id']0112Name:some_id,dtype:int64LicenseMIT LicenseCopyright (c) 2018 Aaron BurgessPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: cleanphi
CleanPhiCleanPhi is a powerful Python framework designed to enhance text processing by effectively removing unwanted elements such as extraneous characters and unicodes. Leveraging the capabilities of natural language processing, CleanPhi provides a comprehensive set of functionalities, making it an invaluable tool for text cleaning and related tasks.fromCleanPhiimportcleanclean("some input",unicode=True,# fix various unicode errorsto_ascii=True,# transliterate to closest ASCII representationto_lower=True,# to_lowercase textno_line_breaks=False,# fully strip line breaks as opposed to only normalizing themremove_url=False,# replace all URLs with a special tokenremove_email=False,# replace all email addresses with a special tokenremove_ph=False,# replace all phone numbers with a special tokenremove_nums=False,# replace all numbers with a special tokenremove_digits=False,# replace all digits with a special tokenremove_currency=False,# replace all currency symbols with a special tokenremove_punct=False,# remove punctuationsreplace_with_punct="",# instead of removing punctuations you may replace themreplace_with_url="<URL>",replace_with_email="<EMAIL>",replace_with_phone_number="<PHONE>",replace_with_number="<NUMBER>",replace_with_digit="0",replace_with_currency_symbol="<CUR>",lang="en"# set to 'de' for German special handling)Choose an arguement and use thecleanfunction in your code:importCleanPhitext="Hello, world!  Hello...\t\tworld?\n\nHello:\r\n\n\nWorld. "proc_text="Hello, world! Hello... world?\nHello:\nWorld."assertCleanPhi.remove_whitespace(text,no_line_breaks=False)==proc_textassertCleanPhi.remove_whitespace(" dd\nd  ",no_line_breaks=True)=="dd d"To install CleanPhi in >=Python3.6pipinstallCleanPhiUse CleanPhi with ScikitfromCleanPhi.scikitimportPhiTransformercleaner=PhiTransformer(remove_punct=False,to_lower=False)cleaner.transform(['Clean text.','Natural language processing!'])Version 0.2.0Bugs fixed
Package: cleanpy
cleanpySummaryInstallationInstallation: pipInstallation: snapUsageExecution exampleCommand helpDependenciesSummarycleanpyis a CLI tool to remove caches and temporary files related to Python.InstallationInstallation: pippip install cleanpyInstallation: snapsudo snap install cleanpyUsagecleanpy DIR_PATH [DIR_PATH ...]cleanpywill remove cache files and temporary files under the DIR_PATHRemove files/directories are as follows:files:*.pyc*.pyodirectories:__pycache__.cache.mypy_cache.pytest_cacheYou can also remove additional files/directories if the following options are specified:--include-builds:builddistdocs/_build:[sphinx]*.manifest:[pyinstaller]*.spec:[pyinstaller]--include-envs:.venv.nox.tox--include-metadata:.eggs*.egg-info.pyre/.pytype/pip-wheel-metadata--include-testing:.coveragecoverage.xmlnosetests.xmlAll the above options are specified if you use the--alloption.The following directories are excluded from the remove:.git.hg.svnnode_modulesExecution exampleClean the current directory except for virtual environments:cleanpy --all --exclude-envs .Command helpusage: cleanpy [-h] [-V] [--list] [--follow-symlinks] [--dry-run] [-a] [--include-builds] [--include-envs] [--include-metadata] [--include-testing] [--exclude PATTERN] [--exclude-envs] [-i | -f] [-v | --debug | --quiet] DIR_PATH [DIR_PATH ...]

Remove cache files and temporary files that are related to Python.

Skip directories from recursive search: .git, .hg, .svn, node_modules

positional arguments:
  DIR_PATH            path to a root directory to search.

options:
  -h, --help          show this help message and exit
  -V, --version       show program's version number and exit
  --list              print target directories/files. this does not actually remove directories/files.
  --follow-symlinks   follow symlinks.
  --dry-run           do no harm.
  -i, --interactive   prompt on each file/directory delete.
  -f, --force         delete file/directory without prompt.
  -v, --verbose       shows the verbose output.
  --debug             for debug print.
  --quiet             suppress execution log messages.

Remove Target:
  -a, --all           remove all of the caches and temporary files.
  --include-builds    remove files/directories that are related to build: build, dist, docs/_build
  --include-envs      remove virtual environment caches.
  --include-metadata  remove metadata.
  --include-testing   remove test results and coverage files.
  --exclude PATTERN   a regular expression for files and directories to be excluded from the removes.
  --exclude-envs      exclude virtual environments from deletion.

Issue tracker: https://github.com/thombashi/cleanpy/issuesDependenciesPython 3.7+no external package dependenciesplatform independent
Package: clean-py
Clean PyOverviewA small CLI program designed to automatically lint.ipynband.pysource code. Tidy and remove redundant imports (viaautoflake), sort imports (viaisort), lint and format source code in a standardised way (viablack). Additionally, clear all.ipynbcell outputs and execution counts. Forked from KwatMe's orginalrepo.InstallVia pip:pipinstallclean-pyOr clone directly:gitclonehttps://github.com/samhardyhey/clean_pycdclean_py
pipinstall.UsageClean a single file:clean_pya_single_notebook.ipynb
clean_pya_single_script.pyOr recurse within a input dir:clean_py<input_dir>Clean with specific features if necessary:clean_py<input_dir>-pyTrue-isortTrue-blackFalse-autoflakeFalseTestsSimple pytesting via:pytestMulti-venv tox testing via:toxDistUpdate version withinsetup.pyCreate dist.whland.tararchives via:pythonsetup.pysdistbdist_wheelPush to main pypi repo via:twineuploaddist/*
Package: cleanroom
cleanroomInstall:pip install cleanroomCreate instance in a new process and proxy all operations:importosimporttimefromcleanroomimportcreate_instance,CleanroomArgsclassCal:def__init__(self,base):self.base=basedefinc(self):self.base+=1returnself.basedefpid(self,sleep=None):ifsleep:time.sleep(sleep)returnos.getpid()cal=create_instance(Cal,CleanroomArgs(0))print('Parent PID: ',os.getpid())print('Cal PID: ',cal.pid())print('inc: ',cal.inc())print('inc: ',cal.inc())Output:Parent PID:  22239
Cal PID:  22272
inc:  1
inc:  2Create multiple instances under therandom_accessscheduler:fromcleanroomimportcreate_scheduler,create_instances_under_schedulerscheduler=create_scheduler(instances=5,scheduler_type='random_access')create_instances_under_scheduler(scheduler,Cal,CleanroomArgs(0))print('Parent PID: ',os.getpid())for_inrange(20):pid=scheduler.pid(sleep=1)print(time.ctime(),'Cal PID:',pid)Output:Parent PID:  4376
Thu May 23 14:00:59 2019 Cal PID: 4399
Thu May 23 14:01:00 2019 Cal PID: 4403
Thu May 23 14:01:01 2019 Cal PID: 4397
Thu May 23 14:01:02 2019 Cal PID: 4397
Thu May 23 14:01:03 2019 Cal PID: 4403
Thu May 23 14:01:04 2019 Cal PID: 4399
Thu May 23 14:01:05 2019 Cal PID: 4395
Thu May 23 14:01:06 2019 Cal PID: 4401
Thu May 23 14:01:07 2019 Cal PID: 4399
Thu May 23 14:01:08 2019 Cal PID: 4395
Thu May 23 14:01:09 2019 Cal PID: 4401
Thu May 23 14:01:10 2019 Cal PID: 4401
Thu May 23 14:01:11 2019 Cal PID: 4403
Thu May 23 14:01:12 2019 Cal PID: 4395
Thu May 23 14:01:13 2019 Cal PID: 4397
Thu May 23 14:01:14 2019 Cal PID: 4403
Thu May 23 14:01:15 2019 Cal PID: 4401
Thu May 23 14:01:16 2019 Cal PID: 4395
Thu May 23 14:01:17 2019 Cal PID: 4395
Thu May 23 14:01:18 2019 Cal PID: 4397Create multiple instances under thebatch_random_accessscheduler:scheduler=create_scheduler(instances=5,scheduler_type='batch_random_access')create_instances_under_scheduler(scheduler,Cal,CleanroomArgs(0))print('Parent PID: ',os.getpid())forpidinscheduler.pid(CleanroomArgs(sleep=1)for_inrange(20)):print(time.ctime(),'Cal PID:',pid)Output:Parent PID:  4376
Thu May 23 14:04:47 2019 Cal PID: 4429
Thu May 23 14:04:47 2019 Cal PID: 4433
Thu May 23 14:04:47 2019 Cal PID: 4435
Thu May 23 14:04:48 2019 Cal PID: 4433
Thu May 23 14:04:48 2019 Cal PID: 4437
Thu May 23 14:04:49 2019 Cal PID: 4429
Thu May 23 14:04:49 2019 Cal PID: 4433
Thu May 23 14:04:49 2019 Cal PID: 4437
Thu May 23 14:04:49 2019 Cal PID: 4431
Thu May 23 14:04:49 2019 Cal PID: 4435
Thu May 23 14:04:50 2019 Cal PID: 4429
Thu May 23 14:04:51 2019 Cal PID: 4431
Thu May 23 14:04:51 2019 Cal PID: 4435
Thu May 23 14:04:51 2019 Cal PID: 4431
Thu May 23 14:04:51 2019 Cal PID: 4437
Thu May 23 14:04:53 2019 Cal PID: 4429
Thu May 23 14:04:53 2019 Cal PID: 4431
Thu May 23 14:04:53 2019 Cal PID: 4429
Thu May 23 14:04:53 2019 Cal PID: 4437
Thu May 23 14:04:53 2019 Cal PID: 4437CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2019-05-10)First release on PyPI.
Package: cleanroom-schema
cleanroom-schemaCleanroom reboot of NMDC schemaWebsitehttps://microbiomedata.github.io/cleanroom-schemaRepository Structureexamples/- example dataproject/- project files (do not edit these)src/- source files (edit these)cleanroom_schemaschema-- LinkML schema (edit this)datamodel-- Generated python datamodeltests- python testsDeveloper DocumentationUse the `make` command to generate project artefacts:make all: make everythingmake deploy: deploys siteCreditsthis project was made withlinkml-project-cookiecutter
Package: cleansetext
CleanseTextThis is a simple library to help you clean your textual data.Why do I need this?Honestly there are several packages out there which do similar things, but they've never really worked well for my use cases or don't have all the features I need. So I decided to make my own.The API design is made to be readable, and I don't hesitate to create functions even for trivial tasks as they make reaching the goal easier.How to Install?pip install cleansetextSample usagefrom cleansetext.pipeline import Pipeline
from cleansetext.steps import *
from nltk.tokenize import TweetTokenizer
tk = TweetTokenizer()

# Create a pipeline with a list of preprocessing steps
pipeline = Pipeline([
    RemoveEmojis(),
    RemoveAllPunctuations(),
    RemoveTokensWithOnlyPunctuations(),
    ReplaceURLsandHTMLTags(),
    ReplaceUsernames(),
    RemoveWhiteSpaceOrChunksOfWhiteSpace()
], track_diffs=True)

# Process text
text = "@Mary I hate you    and everything about you ...... 🎉🎉 google.com"
text = tk.tokenize(text)

print(text)
# Output: ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '...', '🎉', '🎉', 'google.com']

print(pipeline.process(text))

# Output:
# ['<USER>', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '<URL>']

pipeline.explain(show_diffs=True)

# Output:
# Step 1: Remove emojis from text | Language: en
# Diff: ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '...', '🎉', '🎉', 'google.com'] -> ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '...', 'google.com']
# Step 2: Remove all punctuations from a list of words | Punctuations: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
# Diff: ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '...', 'google.com'] -> ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '...', 'google.com']
# Step 3: Remove tokens with only punctuations from a list of words | Punctuations: !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
# Diff: ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '...', 'google.com'] -> ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', 'google.com']
# Step 4: Remove URLs and HTML tags from a sentence | Replace with: <URL>
# Diff: ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', 'google.com'] -> ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '<URL>']
# Step 5: Remove usernames from a sentence | Replace with: <USER>
# Diff: ['@Mary', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '<URL>'] -> ['<USER>', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '<URL>']
# Step 6: Remove whitespace from a sentence or chunks of whitespace
# Diff: ['<USER>', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '<URL>'] -> ['<USER>', 'I', 'hate', 'you', 'and', 'everything', 'about', 'you', '<URL>']
Package: cleansor
cleansorThis is a duplicate file detector and cleansor. It finds all file(s) with the extension name entered in the current directory and its subdirectories, calculates their hashes, and stores them in a dictionary. If a hash already exists in the dictionary, it means there's a duplicate file. Finally, it deletes the duplicate files found.install it via (pip/pip3):pip install cleansorexecute the cleansor by (python/python3):python -m cleansorEnter your file extension name (without the dot) then you are good to go!
Package: cleansummary
Get StartedSource code:GitHub RepositoryInstallationUse pip directlypip install cleansummaryOr install from sourcegit clone https://github.com/fonyango/cleansummary.git
cd cleansummary
pip install .UsageImport the libraryfrom cleansummary import CleanSummaryInstantiate the library using a dataframecs = CleanSummary(df)Get proportion of missing datacs.percentage_missing()Get the plot and skewness coefficient of a variablecs.check_skewness('variable_name')Get statistical summarycs.get_statistical_summary(variableType=None)

cs.get_statistical_summary(variableType='categorical')

cs.get_statistical_summary(variableType='numerical')Change Log0.0.4 (15/09/2023)
Package: cleansweep
This is a package that has useful machine vision for use with CarsCHANGE LOGRELEASE 10.0.0.1  (7/27/2021)First Release\RELEASE 20.0.0.2 –> 7/27/2021Just wanted to test some things outreally didn’t don anything\-RELEASE 3
-0.0.0.3–> 7/27/2021
-Just wanted to test some things out
-really didn’t don anything
Package: cleantalk-python-antispam
cleantalk_python_antispamA Python API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.How API stops spam?API uses several simple tests to stop spammers.Spam bots signatures.Blacklists checks by Email, IP, web-sites domain names.JavaScript availability.Comment submit time.Relevance test for the comment.How API works?API sends a comment's text and several previous approved comments to the servers. Servers evaluates the relevance of the comment's text on the topic, tests on spam and finaly provides a solution - to publish or put on manual moderation of comments. If a comment is placed on manual moderation, the plugin adds to the text of a comment explaining the reason for the ban server publishing.RequirementsPython 2.6 and abovePython 3 and aboveSPAM test for text comment samplefromcleantalkimportCleanTalkct=CleanTalk(auth_key='yourkey')ct_result=ct.request(message='abc',# Visitor commentsender_ip='196.19.250.114',# Visitor IP addresssender_email='stop_email@example.com',# Visitor emailsender_nickname='spam_bot',# Visitor nicknamejs_on=1,# Is visitor has JavaScriptsubmit_time=12# Seconds from start form filling till the form POST)#Checkifct_result['allow']:print('Comment allowed. Reason '+ct_result['comment'])print('Comment blocked. Reason '+ct_result['comment'])API Response descriptionAPI returns Python dictionary object, where keys:allow (0|1) - allow to publish or not, in other words spam or hamcomment (string) - server comment for requests.id (string MD5 HEX hash) - unique request idenifier.Installing via PyPiRun the next command in the terminal:pipinstallcleantalk-python-antispamThen you can use Cleantalk class import:fromcleantalk_python_antispam.cleantalkimportCleanTalk