Skip to main content

Prefix or Suffix file name with combination

Project description

combogen

Combination generator for filename, either prefix or suffix

This function takes 7 arguments:

generate_combination(nums, fixed_string="", location="middle", isUpper=True, isLower=True, digits=True, specialChar=True)

Generates random combination of characters based upon arguments and return fixed_string with combination

Parameters:

  • nums: int

    Length of random combination

  • fixed_string (Optional): str

    default: ""

    String in which random combination will be included

  • location (Optional): str

    default: "start"

    values: "start", "middle", "end"

    Location of fixed string in the combination

  • isUpper (Optional): bool

    default: True

    Uppercase characters included in the combination

  • isLower (Optional): bool

    default: True

    Lowercase characters included in the combination

  • digits (Optional): bool

    default: True

    Digits included in the combination

  • specialChar (Optional): bool

    default: False

    Special Characters included in the combination

Returns:

  • str: fixed_string with random combination as per location
    print(generate_combination(4, fixed_string="ABC", location="start"))
        Output: ABCt857
    
    print(generate_combination(4, fixed_string="ABC", location="middle"))
        Output: t8ABC57
    
    print(generate_combination(4, fixed_string="ABC", location="end"))
        Output: t857ABC

--

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

combogen-0.1.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

combogen-0.1.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: combogen-0.1.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for combogen-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1c84457ab0834c5d68c846c94c26a169582f0884725a6aa8183366b5f5090795
MD5 65823d04cc2a867a2adec69610d18a08
BLAKE2b-256 511a7853f9de3117b8a95b835a8efe5f9904ee53e51941f6ef63437c24066bbd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: combogen-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.4

File hashes

Hashes for combogen-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b220dc341c440ceb1404123231b494fe03b593d078efc28ed056216b83dd37cd
MD5 029f46754075fcb8cb6492a4363d0fcd
BLAKE2b-256 bd9a922cf730f21e9af628b0aee432d4eab16629bf5d3f82a9a59f3d30442f02

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