Skip to main content

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.


Python Version License Security

GitHub top language GitHub release (latest by date) GitHub GitHub Repo stars GitHub watchers GitHub forks PyPI - Downloads PyPI PyPI - Format


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 build or python setup.py sdist bdist_wheel

  • twine upload dist/*


License

BSD 3-Clause License: See file LICENSE

Copyright (©) 2025, Alexander Suvorov


Tests & Coverage

LOGO


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

smart_2fa_secure-0.2.4.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smart_2fa_secure-0.2.4-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

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

Hashes for smart_2fa_secure-0.2.4.tar.gz
Algorithm Hash digest
SHA256 fc700ea3939705df4f648a5ba01ed3704640cab9bcddbc4877fac5561ecb6bd5
MD5 50f985163b46b9adbf8956b79260c7d4
BLAKE2b-256 1858b5cea26e8577eca110dc753644102556f7a873f7770807a6ccf57df1515f

See more details on using hashes here.

File details

Details for the file smart_2fa_secure-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for smart_2fa_secure-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 87ff0efaed956c4fd6f53b373bab9eeea3d9f351b9ca62bfd0d4b95c88c345bb
MD5 cd2b4dda0679ed600257ad2b7b5e0666
BLAKE2b-256 5da4f248e0874b6476a39e046deb27c318cbe781836a2b0ba478a31e40ede8d2

See more details on using hashes here.

Supported by

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