Skip to main content

Generate random characters based on character set.

Project description

pyrandomset

PyPI - Python Version GitHub tag (latest SemVer pre-release) PyPI - Downloads

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.2.tar.gz (2.6 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.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyrandomset-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7f259ebaba13ea0dc048d0c16afe936224027330ebe2a8ffed7aab864eb1be42
MD5 ea3bd15ffdfb6ce5cb29727fc2012e6a
BLAKE2b-256 c48750e38d329bce5ff4e49f986d1c4c904fc4ef80f1f3f0f55aa5c3e97d895a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyrandomset-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

File hashes

Hashes for pyrandomset-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8f6647f1f7cd370b56a5e6f849bca591f8973dfbd7035a024de66025dee9ea4c
MD5 bc0d41069a0f3703654f669041834a33
BLAKE2b-256 6046ff31470fe5806604ba1f84f15357f62b3070dd1b35a776c623cc5448e9cb

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