Python Library to get fast extensive Dummy Data for testing

Overview

Dumda

Python Library to get fast extensive Dummy Data for testing https://pypi.org/project/dumda/

Installation

pip install dumda

Usage:

Cities

from dumda import cities

# get a single random city, either from the
# entire pool or from a specific country
print(cities.get_random_city())
print(cities.get_random_city("United States"))

# get a list of random cities, this can also be
# called with a given country (cities.get_random_cities(5, "Zimbabwe")
print(cities.get_random_cities(10))

output

Somerset East
Paducah
['Watsa', 'Westerstede', 'Porto-Novo', 'Dushanbe', 
'Hoeyang', 'Uozu', 'Riyadh', 'Lashio', 'Arendal', 
'Tlapa de Comonfort']

Names

the meta is pretty much the same with names and cities, except a few additional operations

from dumda import names
# get a random name
print(names.get_random_name())
# instead of specific countries, you can pass specific sex
print(names.get_random_name("boy"))
print()
# like, cities get a random list
b = names.get_random_names(15, "boy")
g = names.get_random_names(15, "girl")
the_class = b + g
print("class list: {}".format(the_class))

print()
# additional query options
# generate a full name, for more accurate dummy data
print(names.get_full_name())

# there is also a multiple version of the function, 
# and of course you can enter a sex
print(names.get_full_names(5))
print(names.get_full_name("boy"))
print(names.get_full_names(3, "girl"))

print()
# I added this just because, but you can also 
# get a list of names based on letter
good_names = names.get_names_by_letter("o", 3)
print(good_names)
print(good_names[-1])

output

Armando
Andre

class list: ['Lupe', 'Wilbert', 'Torrence', 'Shad', 'Kyson', 
'Keaton', 'Destin', 'Ridge', 'Jorden', 'Enzo', 'Reginal', 
'Aarav', 'Deontae', 'Reggie', 'Kameron', 'Anya', 'Therese', 
'Kaylee', 'Linette', 'Greta', 'Allie', 'Deanne', 'Coretta', 
'Nila', 'Jazlyn', 'Lolita', 'Cherry', 'Clare', 'Breanne', 'Cheri']

Davian Yung
['Glynda Zavala', 'Unknown Booth', 'Leigh Flood', 'Ben Dupree', 
'Adrien Zachary']
Kimberly Higgins
['Jocelyn Zelaya', 'Kalene Ross', 'Melba Tran']

['Oscar', 'Otis', 'Oliver']
Oliver

Phone Numbers

In cases that you are making something like a phonebook or directory, you can also generate phone numbers (that follow U.S. formatting). You can optionally pass an area code if you want to generate phones for people from a specific area.

from dumda.phones import generate_number
# generate a random phone number based on US standard
print(generate_number())
# generate based on a given area code
print(generate_number("202"))

output:

901-212-2734
202-741-8998

Emails

Using this package's name class you can also generate random emails

from dumda.names import get_full_name
from dumda.emails import generate_email
# Pass a full name to generate an email
y = get_full_name()
x = generate_email(y)
print(y)
print(x)
z = get_full_name()
print(z)
print(generate_email(z))
output:
Armando Charles
[email protected]
Virgie Innocent
[email protected]

Person Object

Now if you were thinking of combining these for some objects in your program and wanted to keep it simple, I've got it covered.

from dumda import Person
person_one = Person()
# optionally pass sex and country of person
person_two = Person(country="United Kingdom", sex="girl")
print(person_one.json())
print(person_two.json())
output:
{'full_name': 'Armando Charles', 'location': 'Fairhope', 'email': '[email protected]', 'phone': '763-859-7018'}
{'full_name': 'Kinsley Louis', 'location': 'Weybridge', 'email': '[email protected]', 'phone': '623-88-6788'}
You might also like...
Performance monitoring and testing of OpenStack

Browbeat Browbeat is a performance tuning and analysis tool for OpenStack. Browbeat is free, Open Source software. Analyze and tune your Cloud for opt

A python script based on OpenCV-Python, you can automatically hang up the Destiny 2 Throne to get the Dawning  Essence.
A python script based on OpenCV-Python, you can automatically hang up the Destiny 2 Throne to get the Dawning Essence.

A python script based on OpenCV-Python, you can automatically hang up the Destiny 2 Throne to get the Dawning Essence.

Daily knowledge pills to get better in Python.

Python daily pills Daily knowledge pills to get better Python code. Why Does your Python code suffers of any of this symptoms? Incorrect Indentation I

Small exercises to get you used to reading and writing Python code!

Pythonlings Welcome to Pythonlings, an automated Python tutorial program (inspired by Rustlings and Haskellings). WIP This program is still working in

This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

This python code will get requests from SET (The Stock Exchange of Thailand) a previously-close stock price and return it in Thai Baht currency using beautiful soup 4 HTML scrapper.

A python script to get your activity

activities A python script to get your activity Not complete Requirements Python (=3.7) Pip (for python = 3.7) Git Pip packages psutil asyncio aioht

A faster Python generator that get function results from multi-process workers

multiyield This package implements a Python generator that get function results from multi-process workers. The faster_fifo Queue (instead of the stan

Sample python script for monitoring Rocketchat database and get statistics of users.
Sample python script for monitoring Rocketchat database and get statistics of users.

rocketchat-DB-monitoring Sample python script for monitoring Rocketchat database and get statistics of users. 1. Update python: yum check-update && yu

Get information about what a Python frame is currently doing, particularly the AST node being executed

executing This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. Usage Getting th

Owner
Oliver B.
Oliver B.
A Pythonic Data Catalog powered by Ray that brings exabyte-level scalability and fast, ACID-compliant, change-data-capture to your big data workloads.

DeltaCAT DeltaCAT is a Pythonic Data Catalog powered by Ray. Its data storage model allows you to define and manage fast, scalable, ACID-compliant dat

null 45 Oct 15, 2022
An unofficial python API for trading on the DeGiro platform, with the ability to get real time data and historical data.

DegiroAPI An unofficial API for the trading platform Degiro written in Python with the ability to get real time data and historical data for products.

Jorrick Sleijster 5 Dec 16, 2022
Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Ikaros is a free financial library built in pure python that can be used to get information for single stocks, generate signals and build prortfolios

Salma Saidane 64 Sep 28, 2022
Library support get vocabulary from MEM

Features: Support scraping the courses in MEM to take the vocabulary Translate the words to your own language Get the IPA for the English course Insta

Joseph Quang 4 Aug 13, 2022
Minutaria is a basic educational Python timer used to learn python and software testing libraries.

minutaria minutaria is a basic educational Python timer. The project is educational, it aims to teach myself programming, python programming, python's

null 1 Jul 16, 2021
Modify version of impacket wmiexec.py, get output(data,response) from registry, don't need SMB connection, also bypassing antivirus-software in lateral movement like WMIHACKER.

wmiexec-RegOut Modify version of impacket wmiexec.py,wmipersist.py. Got output(data,response) from registry, don't need SMB connection, but I'm in the

小离 228 Jan 4, 2023
App to get data from popular polish pages with job offers

Job board parser I written simple app to get me data from popular pages with job offers, because I wanted to knew immidietly if there is some new offe

null 0 Jan 4, 2022
VCC-Generator is a python script that generate VCC for testing purposes only

VCC-Generator is a python script that generate VCC for testing purposes only

Spider Anongreyhat 10 Oct 23, 2022
This module extends twarc to allow you to print out tweets as text for easy testing on the command line

twarc-text This module extends twarc to allow you to print out tweets as text for easy testing on the command line. Maybe it's useful for spot checkin

Documenting the Now 2 Oct 12, 2021
Demo repository for Saltconf21 talk - Testing strategies for Salt states

Saltconf21 testing strategies Demonstration repository for my Saltconf21 talk "Strategies for testing Salt states" Talk recording Slides and demos Get

Barney Sowood 3 Mar 31, 2022