Skip to main content

Authentication system in Python made easy

Project description

AuthPy is a simple authentication library for Python that provides functionality for user signup and login with secure password storage. It utilizes bcrypt for password hashing and encryption for enhanced security.

Features:

User signup with strong password requirements
User login with password verification
Secure storage of usernames and passwords using encryption
Automatic database creation if not found

Usage: Install Authpy - pip install authpy Import AuthPy - from authpy import AuthPy Create an AuthPy Class - auth = AuthPy() Use the auth instance to call the following methods:

signup(username, password): Sign up a new user with a username and password. 
	
login(username, password): Log in an existing user with a username and password. 

Example Usage:

# Create AuthPy instance
auth = AuthPy()

# Sign up a new user
username_input = input("What is your username: ")
password_input = input("Enter your password: ")
try:
	auth.signup(username_input, password_input)
	print("Signup successful")
except ValueError as e:
	print("Signup failed:", str(e))

# Log in an existing user
username_input = input("What is your username: ")
password_input = input("Enter your password: ")
login_result = auth.login(username_input, password_input)
print(login_result)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

authpy-2.1.1.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

authpy-2.1.1-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page