Skip to main content

This project provides a tools for getting various format or kind Random Value.

Project description

This project provides a tools for getting various format or kind Random Value.

How to Install

$ pip install RandomGetter

or

$ git clone https://github.com/RandomGetter
$ cd RandomGetter
$ python install setup.py

Usage

$ random_getter.py [option]

Note that no arguments are required.

For example,

$ random_getter.py -f "([double], [str])"
(-690.8986415091822, _m_c)
$ random_getter.py -f "([int-10:10], [double:3])"
(0, -5363.877296867747)
$ random_getter.py
-1603

Options

In default, length of random values is 4 and type of random values is int.

This means that in default, this program occurs int object and -10**4 + 1 <= random number < 10**4 - 1.

  • –int: occur int random value

  • –str: occur str random value (str means …)

  • –double: occur double random value

  • -n, –number: indicate number of random values

  • -l, –length: indicate length of random values

  • –min: indicate default minimal value

  • –max: indicate default maximal value

  • –min-int: indicate minimal value of random int values

  • –max-int: indicate maximal value of random int values

  • –min-double: indicate minimal value of random double values

  • –max-double: indicate maximal value of random double values

  • -f, –format: indicate format of occured random values

Format

$ random_getter.py -f "([int], [double])"
(568, 5079.63840808)
$ random_getter.py -f "[int1000]"
2288
$ random_getter.py -f "[int:0]"
-2656
$ random_getter.py -f "[int-100:100]"
45

Format is a string which embed “format-element”.

“format-element” is one of following style:

  • [{type}]: random {type} value

  • [{type}{min}]: random {type} value more than or equal to {min}

  • [{type}:{max}]: random {type} value less than or equal to {max}

  • [{type}{min}:{max}]: random {type} value less than or equal to {max} and more than or equal to {min}

License

Apache License 2.0

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

RandomGetter-0.0.7.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

RandomGetter-0.0.7-py2.py3-none-any.whl (8.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file RandomGetter-0.0.7.tar.gz.

File metadata

File hashes

Hashes for RandomGetter-0.0.7.tar.gz
Algorithm Hash digest
SHA256 1c9d0df42fe99d00c701663f5aec7b94994e32f2eb7f4834a4340d114d706554
MD5 9cadc5ba783e283b5f9a138037ff726d
BLAKE2b-256 22a9fcc04123dbf400b7641afa1ac60fa8baa91417f65b90204209720acf4eab

See more details on using hashes here.

File details

Details for the file RandomGetter-0.0.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for RandomGetter-0.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 401ce56bd3b65bacccbad9d1e9447e7ded0eebf5c00dcdc2200570638cdba1e9
MD5 66981366b0767d03c39a09abb91a7bae
BLAKE2b-256 d7443014a5ad2e14a7358e32f6b02bb2def5b11a5d6d728ecac7fad464d234fe

See more details on using hashes here.

Supported by

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