Skip to main content

A package full of random functions...

Project description

randfunc

A simple and easy to use collection of random python functions.


Installation

  • From source (for the latest untested version)
pip install git+https://github.com/Cu3t0m/randfunc.git
  • With pip
pip install randfunc

Example use

Commentary

>>> randfunc.commentary("Eat Grass")
'Eat Grass'

This will be in grey.

Clear

>>> randfunc.clear()
''

Warn

>>> randfunc.string("I like Chicken")
'I like Chicken'

This will be in red.

Wait

>>> randfunc.wait(10)
'10'

This happens after 10 seconds

Clear

>>> randfunc.clear()
'iDa7FZl7rW'

String

>>> randfunc.string(10)
'iDa7FZl7rW'

Prascii

>>> randfunc.prascii("hello")
 _            _  _        
| |__    ___ | || |  ___  
| '_ \  / _ \| || | / _ \ 
| | | ||  __/| || || (_) |
|_| |_| \___||_||_| \___/ 

Integer

>>> randfunc.integer(0, 100)
15

Array

>>> randfunc.array('123456789', 5)
['7', '5', '9', '3', '2']

Datetime

datetime.datetime(2016, 5, 24, 16, 34, 2, 726892)
>>> randfunc.datetime(
... start=datetime.datetime(year=2016, month=1, day=1),
... end=datetime.datetime(year=2016, month=12, day=31))
datetime.datetime(2016, 2, 13, 21, 34, 58, 268978)

Mail Address

>>> randfunc.mail()
'iYpZpde@jslx4.com'

MAC Address

>>> randfunc.mac_address()
'fe:23:1d:1d:ec:be'

It's also possible to define an own prefix.

>>> randfunc.mac_address('02:00:00')
'02:00:00:84:62:3e'

>>> mac_address('02:00:00:00:00')
'02:00:00:00:00:63'

IPv4 Address

>>> randfunc.ipv4address()
'108.146.211.120'

IPv6 Address

>>> randfunc.ipv6address()
'7dd7:c3ee:b1b6:ba15:6bb6:c908:541a:efe4'

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

randfunc-0.0.4.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

randfunc-0.0.4-py2.py3-none-any.whl (7.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file randfunc-0.0.4.tar.gz.

File metadata

  • Download URL: randfunc-0.0.4.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

File hashes

Hashes for randfunc-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7a5948dedffb1dc0e329511586d8bd62209eae3476c0a688bbba39180271cb14
MD5 5a91d0e7b41e5e2a2a4bbedb7253512a
BLAKE2b-256 80d7dac80989a7b75e24a0a4ed9f409ab0d28456c828a99ccbd1428cb46d21cd

See more details on using hashes here.

File details

Details for the file randfunc-0.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: randfunc-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/3.10.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

File hashes

Hashes for randfunc-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e5d45b1cf77fec98d890fa9aa552e2adba7b9f0d69079e2db675c26ca0559c54
MD5 234edeb292984c24191396f494399186
BLAKE2b-256 6cf31ebb0e3e341c0c1b8baae7a872436970d9ac67193cfba114a7852b92b74f

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