Skip to content

paulmuenzner/harvard-university-final-project-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License Python GitHub code size paulmuenzner github Contributors


Harvard Final Project

Programming with Python

Authorization - Testing - Validation
EXPLORE DOCS

Header

About

This Python application serves as the culmination of a simplified authentication process. Developed by Paul Münzner as part of Harvard's Programming with Python course, the application provides users with two distinct options. Individuals can choose to register using an email address and password or attempt to log in by providing their email address and password. This project adheres to specific requirements, guidelines and constraints outlined by Harvard.

Video presentation

Details

The registration process involves validating the password using regex to ensure it adheres to a specific format. The email address is validated using the validators library installed via pip. Conversely, the login input is intentionally not validated to prevent providing hints to potential malicious users.

Flowchart

Upon successful registration, the relevant data, namely the email address and password in a hashed format, is stored in a CSV file. This information is essential for subsequent logins.

For the login process, the procedure differs. Initially, the program checks if there have been more than 3 failed login attempts with a specific email address within the last 10 minutes. Essentially, this serves as a rate limiter. If the rate limit threshold has been exceeded, access is denied, and the program terminates, marking the login attempt as unsuccessful.

However, if the user has not reached the 3 failed login attempts within the last 10 minutes, the login process proceeds. It verifies if the entered password is correct. In case of a mismatch, this unsuccessful attempt is recorded in a second CSV file, contributing to the rate limiter's information.

If a registration with the provided email address exists in registrations.csv and the entered password matches the registered password, the user has successfully fulfilled all the requirements of the login procedure.

Harvard's Programming with Python

About the course

This course, offered by Harvard University through Harvard Online, provides a comprehensive understanding to the world of programming using Python. Designed for both beginners and those with some prior programming experience, the course equips you with the fundamental skills and knowledge needed to navigate the exciting world of coding.

Requirements

This Python application, developed as a final project for Harvard's course 'Introduction to Programming with Python', adheres to specific requirements and guidelines outlined by the course. Understanding these constraints will help users navigate the structure and conventions of the project.

Understanding these requirements will provide insight into the project's structure and how it aligns with the specifications set forth by the course.

Implementation in Python:

  • The entire project is implemented in Python to align with the course guidelines.

Main Function and Additional Functions:

  • The project includes a main function along with three or more additional functions.
  • At least three of these functions are accompanied by tests that can be executed with pytest.

File Structure:

  • The main function is located in a file named project.py, positioned in the root (top-level folder) of the project.
  • The three required custom functions (other than main) are also in project.py and are defined at the same indentation level as the main function.

Test Functions:

  • Test functions are placed in a file named test_project.py, situated in the root of the project.
  • Each test function has the same name as the corresponding custom function in project.py, prepended with test_.

Additional Implementations:

  • Beyond the minimum requirements, the project may include additional classes and functions as deemed appropriate.

Time and Effort:

  • The implementation of the project involves more time and effort compared to the course’s individual problem sets.

Requirements File:

  • Any pip-installable libraries essential for the project are listed in a file named requirements.txt in the root of the project. Each library is listed on a separate line.

Tech Stack

This project is basically built with and for:

  • Python
  • pytest
  • bcrypt
  • Validators Documentation

(back to top)

Demo

Coming soon ...

Roadmap

This project, designed to fulfill the requirements of the Harvard University course, serves as the final assignment, and thus, no roadmap is available.

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Paul Münzner: https://paulmuenzner.com

Project Link: https://github.com/paulmuenzner/harvard-university-final-project-python

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

About

Harvard University Final Project Programming with Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages