PKJmD"gen_tools/__init__.py""" Functions and accompanying CLI Tools to generate pseudo-random passwords and UUIDs (GUIDs) """ from .gen_pass_cli import gen_pass from .gen_uuid_cli import gen_uuid __version__ = "0.1.0" PKJ@gen_tools/gen_pass_cli.py#!/usr/bin/env python3.6 import secrets import string import sys def gen_pass(pass_length: int = 8) -> str: """ Return random alphanumeric str with a length of pass_length. :param pass_length: length of returned password. :return: generated password as str. """ alphanumeric_chars = string.ascii_letters + string.digits return ''.join(secrets.choice(alphanumeric_chars) for i in range(pass_length)) def main(password_length: int = 8): sys.stdout.write(gen_pass(password_length)) if __name__ == '__main__': try: main(int(sys.argv[1])) except IndexError as e: main() PK팚Jgen_tools/gen_uuid_cli.py#!/usr/bin/env python3.6 import sys import uuid def gen_uuid(capitalize: bool = False) -> str: """ Return random UUID. If capitalize is True then use upper case for letters. :param capitalize: whether or not to use upper case letters. :return: generated UUID as str. """ if capitalize: resp = str(uuid.uuid4()).upper() else: resp = str(uuid.uuid4()) return resp def main(): sys.stdout.write(gen_uuid()) if __name__ == '__main__': main() PK!HU>a*gen_tools-0.1.0.dist-info/entry_points.txtN+I/N.,()JO͋/H,.VU1Ks`9Vy`e)@e\PK!H;@QPgen_tools-0.1.0.dist-info/WHEEL1 0 RZq+D-Dv;_[*7Fp ܦpv/fݞoL(*IPK!H@fx'"gen_tools-0.1.0.dist-info/METADATAe_O0)#>dD1aA}$׭m' J=wI{c̭Z1鐔(9׺uhN3D3TU XUZTP s0xE8: :wж;-yb ;ci+ iuHdrIW.O}z)ɴ;mٓpIzwD-vG ]:|sRڰ"-` V9Lo~sӍpS `0)rzIGxAQcz !q!ϢPK!Hx ,d# gen_tools-0.1.0.dist-info/RECORD}˒0}?Kd"E/E@Ai[Jrڐ6<,ꅻ_5Ms? 5HlʔבmΤ-Vpw6DlR I$ ?eӍ.H,VhfM|{Oض 5\݄~:ez:R#3EN$KP:S.&.y-a D/ffSj%0{;3D[ Y$?1,A]ny({U>;Wˈ*_>Q;K{[]zX}3XP}]EU<:u]U{&xPKJmD"gen_tools/__init__.pyPKJ@gen_tools/gen_pass_cli.pyPK팚Jgen_tools/gen_uuid_cli.pyPK!HU>a*"gen_tools-0.1.0.dist-info/entry_points.txtPK!H;@QPgen_tools-0.1.0.dist-info/WHEELPK!H@fx'"6gen_tools-0.1.0.dist-info/METADATAPK!Hx ,d# gen_tools-0.1.0.dist-info/RECORDPK?