Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Simple python package to generate random dictionaries of given types.

Project description

Travis CI build SonarCloud Quality SonarCloud Maintainability Codacy Maintainability Maintainability Pypi project Pypi total project downloads

Simple python package to generate random dictionaries of given types.

How do I install this package?

As usual, just download it using pip:

pip install random_dict

Tests Coverage

Since some software handling coverages sometime get slightly different results, here’s three of them:

Coveralls Coverage SonarCloud Coverage Code Climate Coverate

Usage examples

Generator random_string_dict

This function will generate a dictionary with given at most max_depth and max_height of type string.

from random_dict import random_string_dict
from random import randint

random_string_dict(randint(1, 10), randint(1, 10))

Generator random_bool_dict

This function will generate a dictionary with given at most max_depth and max_height of type bool.

from random_dict import random_bool_dict
from random import randint

random_bool_dict(randint(1, 10), randint(1, 10))

Generator random_float_dict

This function will generate a dictionary with given at most max_depth and max_height of type float.

from random_dict import random_float_dict
from random import randint

random_float_dict(randint(1, 10), randint(1, 10))

Generator random_int_dict

This function will generate a dictionary with given at most max_depth and max_height of type int.

from random_dict import random_int_dict
from random import randint

random_int_dict(randint(1, 10), randint(1, 10))

Generator random_dict

This function will generate a dictionary with given at most max_depth and max_height of mixed types.

from random_dict import random_dict
from random import randint

random_dict(randint(1, 10), randint(1, 10))

Some generated examples can be found within the examples folder.

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 random-dict, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size random_dict-1.0.4.tar.gz (3.9 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