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.1.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.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrandomset-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 527f1256de89b916b7cd46add05d3fee40a3e857c9d04d15659d499e092d5039
MD5 87fb7e708588296c0edcdc04f63aa198
BLAKE2b-256 09796c1b5b4eb70124a8868e5a6f578e0fe6f8fc53fddfe191be153fd7eb3125

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrandomset-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f2121c13a566eac4fc70f439ae869d950bb7cad19e660160c512018c9d0f2302
MD5 489775584cf57389b94f91c88ba0cf21
BLAKE2b-256 3fddc8b8f837c58bff31c3cebc27b130dffb72ec3f799fefb943b06247083c18

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