Package: safetokengen
SafeTokenGenEffortlessly generate secure tokens for your projects with theSafeTokenGenpackage. Simplify the process of creating Passwords, OTPs, PINs, API keys, and Tokens without the hassle of implementing complex algorithms.Features:Generate Passwords, OTPs, PINs, API keys and Token lists with various options for customization.No need to build token generation algorithms from scratch.Tokens are never hashed or stored, ensuring top-notch security. It generates only leaving you to store/hash as you please.Streamline your development process and save time.Get started today and supercharge your token generation workflow.InstallationYou can install theSafeTokenGenpackage using pip:pipinstallsafetokengenUsageAPI Key GenerationImport the package and use the provided functions to generate API keys and passwords with varying degrees of control.Simple API Key GenerationGenerate a simple API key using thegenerate_api_keyfunction:fromsafetokengenimportgenerate_api_key# Generate a hex-based API key with a length of 16 charactersapi_key=generate_api_key(16,"hex")print(api_key)# Example output: "1a2b3c4d5e6f7a8b"You can also generatealphabetic-basedusing "alphabetic" andalphanumeric-basedkeys using "alphanumeric" respectivelyControlled API Key GenerationFor more control, utilize thegenerate_api_key_controlfunction to generate API keys with prefixes, dividers, and custom options:fromsafetokengenimportgenerate_api_key_control# Generate a controlled API key with a length of 16 characters,# alphanumeric characters, a prefix, and custom dividersdivider_indices=[4,9,13]custom_divider="-"prefix_value="test"api_key=generate_api_key_control(16,"alphanumeric",prefix_value,True,divider_indices,custom_divider)print(api_key)# Example output: "test-FIX2-3ab4c-def5g"Password GenerationSimple Password GenerationGenerate a simple password using thegenerate_passwordfunction:fromsafetokengenimportgenerate_password# Generate a password with a minimum length of 12 characterspassword=generate_password(12)print(password)# Example output: "jK9$2fA5zH1@"Controlled Password GenerationFor more control, utilize thegenerate_password_controlfunction to generate passwords with specific criteria:fromsafetokengenimportgenerate_password_control# Generate a password with a minimum length of 12 characters,# including lowercase, uppercase, numbers, and special characterspassword=generate_password_control(12,lower=True,upper=True,numbers=True,special_characters=True)print(password)# Example output: "xY3!zP8qR@5"Token List GenerationGenerate a list of unique tokens using thegenerate_token_listfunction:fromsafetokengenimportgenerate_token_list# Generate a list of 10 unique alphanumeric tokens, each with a length of 6 characterstoken_list=generate_token_list(6,10,True)print(token_list)# Example output: ['1a2b3c', 'x4y5z6', 'pQrStU', ...]OTP GenerationGenerate an OTP using thegenerate_otpfunction:fromsafetokengenimportgenerate_otp# Generate a 6-digit OTP composed of only digitsotp=generate_otp(6)print(otp)# Example output: "123456"PIN GenerationGenerate a PIN using thegenerate_pinfunction:fromsafetokengenimportgenerate_pin# Generate a 4-digit PIN composed of only digitspin=generate_pin(4)print(pin)# Example output: "7890"ContributingContributions are encouraged! If you encounter any issues or have ideas for enhancements, feel free to open an issue or submit a pull request.LicenseThis project is licensed under the MIT License. See the LICENSE file for details.