Skip to main content

A library that returns naughty strings from an offline database of Big List of Naughty Strings & emojis

Project description

https://img.shields.io/pypi/v/naughty-string-validator.svg https://img.shields.io/pypi/pyversions/naughty-string-validator.svg https://travis-ci.org/shashikumarraja/naughty_string_validator_python.svg?branch=master https://codecov.io/gh/shashikumarraja/naughty_string_validator_python/branch/master/graph/badge.svg Updates https://pepy.tech/badge/naughty-string-validator https://img.shields.io/badge/License-MIT-blue.svg

A python library that returns naughty strings from an offline database of Big List of Naughty Strings and emojis. The db will be continuously growing with each release.

The Big List of Naughty Strings is an evolving list of strings which have a high probability of causing issues when used as user-input data.

This library can be inluded in the test automation framework for API, UI, or DB testing to validate them against naughty strings.

Installation

pip install naughty_string_validator

Usage

from naughty_string_validator import *
  • To get a random naughty string from the list
print(get_random_naughty_string())

#output
"<a href=\"\\xE2\\x80\\x88javascript…(1)\" id=\"fuzzelement1\">test</a>"
  • To get entire naughty string list
print(get_naughty_string_list())

#output
["", "undefined", "undef", "null", "NULL", "(null)", "nil", ]
  • To get a random emoji from the emoji list
print(get_random_emoji())

#output
"😃"
  • To get a entire emoji list
print(get_emoji_list())

#output
["😀", "😃", "😄", "😁", "😆", "😅", "😂", "🤣", "☺️", "😊", ]

Tests

  • To run tests

    py.test –cov=naughty_string_validator test/ –verbose

History

0.1.7 (2020-05-07)

  • Minor improvements in code
  • Fixed bug introduced by 0.1.6 of utils not found while importing in python version 3

0.1.2 (2018-09-03)

  • Removed test code from build

0.1.0 (2018-09-03)

  • First release on PyPI.

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 naughty-string-validator, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size naughty_string_validator-0.1.7-py2.py3-none-any.whl (41.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size naughty_string_validator-0.1.7.tar.gz (43.5 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