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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file authpy-2.1.1.tar.gz.

File metadata

  • Download URL: authpy-2.1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for authpy-2.1.1.tar.gz
Algorithm Hash digest
SHA256 d96ec2aaa3f36775afcafcad2f0a7e19d188eb811adfab0aad6c8746a20533ba
MD5 f3a5fedb1f5ff9c05cf310b17670f8a9
BLAKE2b-256 8ac409f1e350197815092ccbd6b5a641746aa1a7dfe3816356a3e92f284326e2

See more details on using hashes here.

File details

Details for the file authpy-2.1.1-py3-none-any.whl.

File metadata

  • Download URL: authpy-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for authpy-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 12db24320d140d46da18c72b1e17c5d0df7eee28ee8e2bd94bea5ed15a9dc9ab
MD5 4220af02420f64148093fcd43b6acbdf
BLAKE2b-256 aa99c756a8b82ab2bd52583fb6fd3d252372b5e51395b187f8e57426199d7011

See more details on using hashes here.

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