Skip to main content

Generate random characters based on character set.

Project description

pyrandomset

Generate random characters based on character set.

Characters sets

Placeholder Type Character Set
a Lower-Case Alphanumeric abcdefghijklmnopqrstuvwxyz 0123456789
A Mixed-Case Alphanumeric ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
U Upper-Case Alphanumeric ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
d Digit 0123456789
h Lower-Case Hex Character 0123456789 abcdef
H Upper-Case Hex Character 0123456789 ABCDEF
l Lower-Case Letter abcdefghijklmnopqrstuvwxyz
L Mixed-Case Letter ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
u Upper-Case Letter ABCDEFGHIJKLMNOPQRSTUVWXYZ
v Lower-Case Vowel aeiou
v Mixed-Case Vowel AEIOU aeiou
Z Upper-Case Vowel AEIOU
c Lower-Case Consonant bcdfghjklmnpqrstvwxyz
C Mixed-Case Consonant BCDFGHJKLMNPQRSTVWXYZ bcdfghjklmnpqrstvwxyz
z Upper-Case Consonant BCDFGHJKLMNPQRSTVWXYZ
p Punctuation ,.;:
b Bracket ()[]{}<>
s Printable 7-Bit Special Character !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
\ Escape (Fixed Char) Use following character as is.

Example

from pyrandomset import generate

# Generate a ten-character alphanumeric with at least one lowercase character, 
# at least one uppercase character, and at least three digits:
print(generate("AAAAAluddd", shuffle=True))

# Generate three unique random syllable:
print(generate("zv\ zv\ zv", repeat=False))

# Generate 1 character from custom set, three uppercase letters, 
# three lowercase letters and two digits:
print(generate("?uuullldd", { "?": "!@#$%" }))

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

pyrandomset-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

pyrandomset-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file pyrandomset-0.1.0.tar.gz.

File metadata

  • Download URL: pyrandomset-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for pyrandomset-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d08c2ef90e00c25fa20dec70090d3193f8f548106720eb2fccc027658b2710cb
MD5 2200e7cf2be10bed8fdbda3fd88d5dc8
BLAKE2b-256 8846dc9f496a1dcb4b290130898bea4b93d3bb4187e67fc78b3e4ff255bf5188

See more details on using hashes here.

File details

Details for the file pyrandomset-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyrandomset-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for pyrandomset-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecc72787ed41790fc0125a66bc5506086d0c117dcd68e569e38d1051afa8c0cf
MD5 44b9de990ae6c7fb587524c025a4fced
BLAKE2b-256 73101579548820da7c59c88873c731b4a64100952961ed608b884a8f57c844e5

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