Git Product home page Git Product logo

manavalan2517 / login-and-register-system-in-python Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 1.3 MB

This Python script is a comprehensive solution for managing user authentication, which includes both registration and login functionalities. It utilizes a local JSON file to store user credentials securely.

Python 100.00%
json py3 python authentication interactive regex security terminal user-management realtime

login-and-register-system-in-python's Introduction

Authentication System in Python

Thumbnail

This project is just a basic method of securing users data

This project provides a comprehensive user authentication and management system, consisting of three main Python files: main.py, server.py, and client.py. The system supports user registration, login, and account deletion, while ensuring secure password storage using bcrypt hashing. Additionally, the project includes a JSON file (data.json) to store user data.

File Descriptions

  1. main.py: A command-line interface (CLI) application that allows users to register, log in, and delete their accounts. The application uses the questionary library to create interactive prompts and the bcrypt library to securely hash and verify passwords.
  2. server.py: A FastAPI-based server that exposes RESTful endpoints for user registration, login, and account deletion. The server also utilizes bcrypt for password hashing and verification, and stores user data in a JSON file.
  3. client.py: A client application that interacts with the FastAPI server using the requests library. The client demonstrates how to register, log in, and delete user accounts by sending HTTP requests to the server's endpoints.

Features

  • User registration with password validation (minimum length, uppercase, lowercase, and numeric character requirements) and email validation.
  • Secure password storage using bcrypt hashing.
  • User login with case-insensitive username support.
  • Account deletion for registered users.
  • JSON-based data storage for user information.

Requirements

  • Python 3.6 or newer
  • uvicorn (for running the FastAPI server)
  • fastapi
  • bcrypt
  • questionary (for the CLI application)
  • requests (for the client application)

Getting Started

  1. Install the required packages:
pip install uvicorn fastapi bcrypt questionary requests
  1. Run the FastAPI server:
python server.py

The server will start listening on http://localhost:8000.

  1. Use the CLI application (main.py) to use auth locally and the client (client.py) to interact with the server.

Notes

  • The CLI application (main.py) can be run independently of the server and uses its own instance of the JSON data file.
  • The client application (client.py) communicates with the server (server.py) and shares the same JSON data file as the server.

login-and-register-system-in-python's People

Contributors

gitcoder052023 avatar manavalan2517 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.