Skip to main content

AuthoRex

AuthoRex is a Python package for generating and authenticating OTPs (One-Time Passwords) using MongoDB for storage. This package is useful for applications that require secure OTP-based authentication.

Features

  • Generate OTPs.
  • Authenticate OTPs.
  • Uses MongoDB for storing OTPs securely.

Installation

You can install AuthoRex using pip:

pip install AuthoRex

Usage

Importing the package

You can import the entire package or specific functions:

import AuthoRex

# Or import specific functions
from AuthoRex import genOTP, authOTP

Generating an OTP

Generate an OTP for a given number:

# Using the package import
print(AuthoRex.genOTP("123"))

# Using the function import
print(genOTP("123"))

Authenticating an OTP

Authenticate an OTP for a given number:

# Using the package import
print(AuthoRex.authOTP("123", 123456))  # Replace 123456 with the actual OTP generated

# Using the function import
print(authOTP("123", 123456))  # Replace 123456 with the actual OTP generated

Example

Here's a complete example of how to use AuthoRex:

import AuthoRex

# Generate OTP for a number
response = AuthoRex.genOTP("123")
print(response)

# Authenticate OTP for the same number
is_authenticated = AuthoRex.authOTP("123", 123456)  # Replace 123456 with the actual OTP generated
print("Authenticated" if is_authenticated else "Authentication Failed")

MongoDB Configuration

AuthoRex uses MongoDB to store OTPs. Make sure you have a MongoDB instance running and update the MongoDB URI in the code as per your setup.

License

This project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. See the LICENSE file for more details.

Author

AuthoRex is developed and maintained by TraxDinosaur. For any queries or support, you can reach out to TraxDinosaur.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.

Acknowledgements

  • The package uses pymongo for MongoDB interactions.

Metadata

Release files for AuthoRex 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for AuthoRex 1.0.2
File Size Uploaded
authorex-1.0.2.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for AuthoRex 1.0.2
File Interpreter ABI Platform
AuthoRex-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / authorex-1.0.2.tar.gz

Download URL authorex-1.0.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d8bb18c75f81c2260e2f02c40e0c38517a488359a947426ab701149b7a1d9e16
BLAKE2b-256 checksum
How to use checksums
e42fc885b93b2d817eb6c39de77b8863e486f0096cd6627dd3dd9d7997a578ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / AuthoRex-1.0.2-py3-none-any.whl

Download URL AuthoRex-1.0.2-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35424e6716f2a22674082fe8227e7c2545cafd71bdcc4eeb4cb86490d90b96b7
BLAKE2b-256 checksum
How to use checksums
4ae7655950e9849d6c5109947eb8ff229393ea91dd75c4477c6914422045faae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page