Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/faraazarsath/guvi-task1
This Python script provides a simple user registration system with username and password validation using regular expressions. It also includes a password recovery option.
https://github.com/faraazarsath/guvi-task1
filehandling if-else python regular-expression
Last synced: 26 days ago
JSON representation
This Python script provides a simple user registration system with username and password validation using regular expressions. It also includes a password recovery option.
- Host: GitHub
- URL: https://github.com/faraazarsath/guvi-task1
- Owner: FaraazArsath
- Created: 2022-07-29T18:34:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-18T17:06:58.000Z (over 1 year ago)
- Last Synced: 2023-10-18T18:25:40.228Z (over 1 year ago)
- Topics: filehandling, if-else, python, regular-expression
- Language: Jupyter Notebook
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GUVI - Assignment 1
# User Login Python Program
A simple Python program that allows users to register, login, and recover forgotten passwords using regular expressions for input validation.## Features
User Registration: Allows users to create a username and password. Validates username and password based on specified criteria.User Login: Allows existing users to log in with their username and password.
Password Recovery: Enables users to recover their password by providing their username.
## Functions
register()
Allows users to create a username. Validates the username using a regular expression for email-like formats.passwd()
Prompts the user to create a password. Enforces criteria like at least one lowercase, one uppercase, one digit, and one special character.forgetpassword()
Initiates the password recovery process. Prompts for a username and checks if it exists in the database.## Regular Expressions
Username: r'^[a-zA-Z]+[\._]?[a-zA-z 0-9]+[@]\w+[.]\w{2,3}$'
Password: r"^(?=.*?[a-z])(?=.*?[A-Z])(?=.*?[0-9])(?=.*?[!@#])"
## Note
User data is stored in a file named database.txt.