Skip to main content

Generates a random string of a specified length.

Project description

rand-string

Generates a random string of a specified length.

Usage

Currently there are 5 types:

  • uppercase
  • lowercase
  • upperlower
  • alphanumerical
  • ascii

You can probably guess what each one would create

The function requires 2 parameters type and length; Type of course is the above.

import rand_string.rand_string as rand
rand.RandString(type, length)

Now lets look at some examples

uppercase:

print(rand.RandString("uppercase", 10))
# Output: TPDROEAVRY

lowercase:

print(rand.RandString("lowercase", 10))
# Output: mdvsewzkwf

upperlower:

print(rand.RandString("upperlower", 10))
# Output: YjHFGzysFx

alphanumerical:

print(rand.RandString("alphanumerical", 10))
# Output: Fy0Nbqno6B

ascii:

print(rand.RandString("ascii", 10))
# Output: jtj-NV<PSV

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

rand-string-0.50.tar.gz (2.0 kB view details)

Uploaded Source

File details

Details for the file rand-string-0.50.tar.gz.

File metadata

  • Download URL: rand-string-0.50.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

File hashes

Hashes for rand-string-0.50.tar.gz
Algorithm Hash digest
SHA256 39d9da8491aea57666e82ea91e4489d187a49bdfa25b8d2a642e39735ee1e3f0
MD5 de24e0df796d950dfe1199008e8b29ef
BLAKE2b-256 6aad4daf29ad0206cc38d0b0d0c440dd3412424944b39e57ad93c9dd218ff368

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