# 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:
```sh
pip install AuthoRex
```
## Usage
### Importing the package
You can import the entire package or specific functions:
```python
import AuthoRex
# Or import specific functions
from AuthoRex import genOTP, authOTP
```
### Generating an OTP
Generate an OTP for a given number:
```python
# 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:
```python
# 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:
```python
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](https://github.com/TraxDinosaur/AuthoRex/blob/main/LICENSE) file for more details.
## Author
AuthoRex is developed and maintained by [TraxDinosaur](https://github.com/TraxDinosaur). For any queries or support, you can reach out to [TraxDinosaur](https://traxdinosaur.github.io).
## Contributing
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
## Acknowledgements
- The package uses [pymongo](https://pypi.org/project/pymongo/) for MongoDB interactions.
Raw data
{
"_id": null,
"home_page": "https://github.com/TraxDinosaur/AuthoRex",
"name": "AuthoRex",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "OTP, authentication, MongoDB, OTP generator, OTP authenticator",
"author": "TraxDinosaur",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e4/2f/c885b93b2d817eb6c39de77b8863e486f0096cd6627dd3dd9d7997a578ad/authorex-1.0.2.tar.gz",
"platform": null,
"description": "# AuthoRex\r\n\r\nAuthoRex 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.\r\n\r\n## Features\r\n\r\n- Generate OTPs.\r\n- Authenticate OTPs.\r\n- Uses MongoDB for storing OTPs securely.\r\n\r\n## Installation\r\n\r\nYou can install AuthoRex using pip:\r\n\r\n```sh\r\npip install AuthoRex\r\n```\r\n\r\n## Usage\r\n\r\n### Importing the package\r\n\r\nYou can import the entire package or specific functions:\r\n\r\n```python\r\nimport AuthoRex\r\n\r\n# Or import specific functions\r\nfrom AuthoRex import genOTP, authOTP\r\n```\r\n\r\n### Generating an OTP\r\n\r\nGenerate an OTP for a given number:\r\n\r\n```python\r\n# Using the package import\r\nprint(AuthoRex.genOTP(\"123\"))\r\n\r\n# Using the function import\r\nprint(genOTP(\"123\"))\r\n```\r\n\r\n### Authenticating an OTP\r\n\r\nAuthenticate an OTP for a given number:\r\n\r\n```python\r\n# Using the package import\r\nprint(AuthoRex.authOTP(\"123\", 123456)) # Replace 123456 with the actual OTP generated\r\n\r\n# Using the function import\r\nprint(authOTP(\"123\", 123456)) # Replace 123456 with the actual OTP generated\r\n```\r\n\r\n## Example\r\n\r\nHere's a complete example of how to use AuthoRex:\r\n\r\n```python\r\nimport AuthoRex\r\n\r\n# Generate OTP for a number\r\nresponse = AuthoRex.genOTP(\"123\")\r\nprint(response)\r\n\r\n# Authenticate OTP for the same number\r\nis_authenticated = AuthoRex.authOTP(\"123\", 123456) # Replace 123456 with the actual OTP generated\r\nprint(\"Authenticated\" if is_authenticated else \"Authentication Failed\")\r\n```\r\n\r\n## MongoDB Configuration\r\n\r\nAuthoRex 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.\r\n\r\n## License\r\n\r\nThis project is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. See the [LICENSE](https://github.com/TraxDinosaur/AuthoRex/blob/main/LICENSE) file for more details.\r\n\r\n## Author\r\n\r\nAuthoRex is developed and maintained by [TraxDinosaur](https://github.com/TraxDinosaur). For any queries or support, you can reach out to [TraxDinosaur](https://traxdinosaur.github.io).\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.\r\n\r\n## Acknowledgements\r\n\r\n- The package uses [pymongo](https://pypi.org/project/pymongo/) for MongoDB interactions.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A package for generating and authenticating OTPs using MongoDB.",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/TraxDinosaur/AuthoRex"
},
"split_keywords": [
"otp",
" authentication",
" mongodb",
" otp generator",
" otp authenticator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4ae7655950e9849d6c5109947eb8ff229393ea91dd75c4477c6914422045faae",
"md5": "9c6c0381926ca093bda5693d2043ad36",
"sha256": "35424e6716f2a22674082fe8227e7c2545cafd71bdcc4eeb4cb86490d90b96b7"
},
"downloads": -1,
"filename": "AuthoRex-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9c6c0381926ca093bda5693d2043ad36",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4141,
"upload_time": "2024-07-03T17:17:46",
"upload_time_iso_8601": "2024-07-03T17:17:46.597671Z",
"url": "https://files.pythonhosted.org/packages/4a/e7/655950e9849d6c5109947eb8ff229393ea91dd75c4477c6914422045faae/AuthoRex-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e42fc885b93b2d817eb6c39de77b8863e486f0096cd6627dd3dd9d7997a578ad",
"md5": "ddde405788e604ec62c1dd6f95370ff5",
"sha256": "d8bb18c75f81c2260e2f02c40e0c38517a488359a947426ab701149b7a1d9e16"
},
"downloads": -1,
"filename": "authorex-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "ddde405788e604ec62c1dd6f95370ff5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3976,
"upload_time": "2024-07-03T17:17:47",
"upload_time_iso_8601": "2024-07-03T17:17:47.965276Z",
"url": "https://files.pythonhosted.org/packages/e4/2f/c885b93b2d817eb6c39de77b8863e486f0096cd6627dd3dd9d7997a578ad/authorex-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-03 17:17:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "TraxDinosaur",
"github_project": "AuthoRex",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "authorex"
}