Advanced Two-Factor Authentication system with enhanced security features.
Project description
Smart 2FA Security System v0.2.4
Advanced Two-Factor Authentication system with enhanced security features.
Key Security Features
-
Complex Code Generation:
- Supports ASCII letters, digits and special characters
- Customizable code length (default: 6)
-
Flexible Expiration:
- Adjustable TTL (Time-To-Live) for codes
- Default 60 seconds expiration
-
📱 Secure Delivery:
- Telegram integration with customizable message templates
⚠️ Disclaimer
By using this software, you agree to the full disclaimer terms.
Summary: Software provided "AS IS" without warranty. You assume all risks.
Full legal disclaimer: See DISCLAIMER.md
Installation
pip install smart-2fa-secure
Advanced Usage
from smart_2fa_secure import Smart2FA
from smart_2fa_secure.exceptions import InvalidCodeError
smart_2fa = Smart2FA(
redis_host="localhost",
redis_port=6379,
telegram_token="YOUR_BOT_TOKEN",
code_ttl=60,
max_attempts=3,
code_length=6,
)
code = smart_2fa.send_code(user_id="user1", recipient="1234567", message="Your code:")
# Verify with complex code
try:
smart_2fa.verify_code("user123", "A1b2@#")
print("Authentication successful!")
except InvalidCodeError:
print("Invalid security code!")
Information for developers:
-
pip install pytest -
pip install pytest-cov -
pip install setuptools -
pip install wheel -
pip install build -
pip install twine -
pytest tests/ -v -
pytest tests/ -v --cov=smart_2fa_secure --cov-report=html -
python -m buildorpython setup.py sdist bdist_wheel -
twine upload dist/*
License
BSD 3-Clause License: See file LICENSE
Copyright (©) 2025, Alexander Suvorov
Tests & Coverage
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smart_2fa_secure-0.2.4.tar.gz.
File metadata
- Download URL: smart_2fa_secure-0.2.4.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc700ea3939705df4f648a5ba01ed3704640cab9bcddbc4877fac5561ecb6bd5
|
|
| MD5 |
50f985163b46b9adbf8956b79260c7d4
|
|
| BLAKE2b-256 |
1858b5cea26e8577eca110dc753644102556f7a873f7770807a6ccf57df1515f
|
File details
Details for the file smart_2fa_secure-0.2.4-py3-none-any.whl.
File metadata
- Download URL: smart_2fa_secure-0.2.4-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87ff0efaed956c4fd6f53b373bab9eeea3d9f351b9ca62bfd0d4b95c88c345bb
|
|
| MD5 |
cd2b4dda0679ed600257ad2b7b5e0666
|
|
| BLAKE2b-256 |
5da4f248e0874b6476a39e046deb27c318cbe781836a2b0ba478a31e40ede8d2
|