Skip to main content

PasswordManager package

This package deals with passwords creating, changing, reseting... them. The main class is called PasswordManager which contains the basic structure and CustomisingPassword is the second class that inherits PasswordManager's methods and structure to create customised passwords. There are several methods and arguments on it which will be explained hereafter:

PasswordManager class:

Main arguments:

  • length: the length of the password (integer, by default: 8)
  • digits: if password contains digits (boolean, by default: True)
  • letters: if password contains letters (boolean, by default: True)
  • mayus: if password contains capital letters (boolean, if letters = False this arguments is not taken into account, by default: True)
  • punctuation: if password contains special characters (boolean, by default: True)

Methods:

  • CreatePassword: Method to create the password meeting class requirements and store it in used passowrds (__password_list - encapsulated argument)

    • Input: No input
    • Output: Created password (str)
  • IsExistingPassword: Method to ensure if a password has already been used

    • Input: Password to check if has been used (str)
    • Output: Message (has been used / never has been used)
  • CreateaSimilarPasswordABIT: Method to become the current method into a similar one (shuffling)

    • Input: No input
    • Output: Message (changed successfully)
  • ResetPassword: Method to reset the current password to empty (no password)

    • Input: No input
    • Output: Message (deleted successfully)
  • ChangeCurrentPassword: Method to change the current password with the input one

    • Input: The new password (str)
    • Output: Message (changed successfully)

CustomisingPassword class:

As it has been mentioned before, this class inherits PasswordManager class. This is used in order to have additional functionalities like creating a customised password or checking if a password is secure enough.

Main arguments:

Bearing in mind it inherits the above class, it has the same atributtes as PasswordManager.

Methods:

Apart from the methods above, it another two functions:

  • CreateCustomisedPassword: Method to customise a password with a given word (givenword + random characters from current password) [It does not change the current password, to do so use method ChangeCurrentPassword]

    • Input: Word to add in the password (str)
    • Output: Customised password (str)
  • IsMyPasswordSecure: Method to check if a password is secure or not taking into account the characteristics

    • Input: Password to be checked (str)
    • Output: A message commenting if the input password is secure

Application example

from password import PasswordManager

  1. First of all we instantiate the class:

pm = PasswordManager() # it will use the default atributtes

  1. We create a password:

mypassword = pm.CreatePassword()

print('My password is:', mypassword) # My password is: p7.!FDf1

  1. We check that the password has been internally stored

print(pm.IsExistingPassword(mypassword)) # This password has been used

print(pm.IsExistingPassword('sdfdfa')) # This password has never been used

  1. We instantiate the second class

cp = CustomisingPassword() # it will use the default atributtes

  1. We create a customised password containing a desired word

new_password = cp.CreateCustomisedPassword('Elene')

print('My new customised password is: ', new_password) # My new customised password is: Elene12=

  1. Check it the customised password is secure

print(cp.IsMyPasswordSecure(new_password)) # Your password is secure

  1. Now that we have created a customised password and it is secure we save it as current password

print(cp.ChangeCurrentPassword(new_password)) # Your password has been changed successfully

Metadata

Release files for pasahitzak 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pasahitzak 0.0.1
File Size Uploaded
pasahitzak-0.0.1.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pasahitzak 0.0.1
File Interpreter ABI Platform
pasahitzak-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / pasahitzak-0.0.1.tar.gz

Download URL pasahitzak-0.0.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d1ecf8d5280927178f7c699a448c451dfed5386c04f2985df98c8756a74b5e5f
BLAKE2b-256 checksum
How to use checksums
0ce6baebc696031538342670332cffc382424f28a5c15ae238c36f2f07b09066
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / pasahitzak-0.0.1-py3-none-any.whl

Download URL pasahitzak-0.0.1-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9160df787c703d6f8853c8cdfdcbb866905e890be091876b023185842c24471d
BLAKE2b-256 checksum
How to use checksums
350eb4dd06145a8e2ed91652b9615115ad1e37b94448ecaa7ad8ed24eab97f21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page