Skip to content

Beloslav13/char-collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CharCollection

With this module you can easily generate a sequence from 1 to 75 characters, including special characters (!@#$%^&*()_=+[]{};:"\|,). This is a stand-alone module, from dependencies , only built-in random module (for now).

There is also a class for generating a password from characters from 6 to 20, including special characters.

Simple use case:

from char_collection.collect import CharacterSequence

collect = CharacterSequence()
collect.collect(10) # Q#,PT^$o&W (random string)

Or you can generate a password like this:

from char_collection.collect_password import CollectPassword
generator = CollectPassword()
generator.collect(8) # B|Gd";;b

You can also use the CollectPasswordNotSpecialSymbol class, which will generate a password without special characters

from char_collection.collect_password import CollectPasswordNotSpecialSymbol
generator_not_special_symbol = CollectPasswordNotSpecialSymbol()
generator_not_special_symbol.collect(8) # L3nAIorm

You can use the password generator, for example, in a telegram bot by connecting this module with the bot. Password must be at least 6 and no more than 20 characters. If the length is false or an exception occurs, returns an error string