Welcome to pyaccounts’s documentation!

Pyaccounts is a python module designed to make integrating user accounts into your software easy. Pyaccounts uses md5 encryption to secure user data.

Login

loginui(#)

Note

The # in the brackets is not meant to be used, readthedocs won’t let me do two brackets by themselves.

Use this when you don’t have the user’s details, it will prompt them to enter their details. Raises a ValueError when login failed.

Example: .. code-block:: python

try:
loginui() #Runs if they login correctly.
except ValueError:
#Runs if they fail to login.
login(user, password)

Use this when you have the user’s details. Variables user and password are strings. Raises a ValueError when incorrect details are passed.

Example: .. code-block:: python

user = input(“What is your username?”) password = input(“What is your password?”) try:

login(user, password) print(“Logged in”) #Runs if they login correctly.
except ValueError:
print(“Incorrect username or password”) #Runs if they fail to login

Register

registerui(#)

Note

The # in the brackets is not meant to be used, readthedocs won’t let me do two brackets by themselves.

Use this when you don’t have the user’s details, it will prompt them to enter their details.

Example:

register(user, password)

Use this when you have the user’s details. Variables user and password are strings.

Example: