Skip to main content

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

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))

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))

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))

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))

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.

Source Distribution

random_dict-1.0.2.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file random_dict-1.0.2.tar.gz.

File metadata

  • Download URL: random_dict-1.0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for random_dict-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6fd86d107134b60db4b54eb96dd1964e3e6efbab616882158a6ccf3262d0b29c
MD5 107efbf8f22a4e679452a9139696e9c9
BLAKE2b-256 86bfd4bc84a4ebeb1c6692600f323bf5abd6a9d1acbd1c5f53f7184500923db3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page