Skip to content

pat266/generate-secret-codes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

generate-secret-codes

About: The algorithm can produce n-amount of genereated codes with m-amount of length (200 and 6 by default respectively). If there is already a code.csv file, it will add more codes to it as appropriately. It uses the secrets library to get each code in order to guarantee the randomness when choosing each letter/digit.

Why: My sister asked me to generate about 100 unique codes to be used as a personal discount code for her product (https://academy.beactiveiseasy.com/), so I made this to satisfy her requirement and make it scalable for the future.

Possible Cons:

  1. If the input number of code to be generated < number of code in the .csv file, it will do nothing. This is to ensure that the generated codes do not get lost.

All arguments/changable variables:

  • path: The path to the directory where code.csv is saved
  • length: the length of each code
  • num: the number of code to be saved in the code.csv file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published