Render9 OTP is a lightweight and easy-to-use Python package for sending OTP messages via the Render9 OTP API.
Project description
Render9 OTP
Render9 OTP is a lightweight and easy-to-use Python package for sending OTP (One-Time Password) messages via the Render9 OTP API. This package is ideal for developers looking to integrate OTP functionality into their Python applications with minimal setup.
Installation
You can install Render9 OTP using pip:
pip install render9
Alternatively, for development purposes, you can install it using:
pip install -e .
Usage
To start using Render9 OTP, you'll need to add your Render9 API key to your environment variables.
Setup Environment Variables
Add your Render9 API key to your .env file:
RENDER9_API_KEY=your_render9_api_key_here
Make sure to add the .env file to your .gitignore to avoid exposing your API key in version control.
Basic Example
Here's an example of how to send an OTP using Render9 OTP in Python:
from dotenv import load_dotenv
from render9 import sendOtp
load_dotenv() # Load environment variables from .env file
def run_example():
result = sendOtp({
'phoneNumber': '1234567890',
'countryCode': '+91',
'otp': '111111',
})
print(result)
if __name__ == "__main__":
run_example()
API Reference
sendOtp(payload: dict) -> dict
Parameters:
phoneNumber(str): The recipient's phone number.countryCode(str): The recipient's country code (e.g., '+91').otp(str): The OTP to be sent.apiKey(str, optional): Your Render9 API key. If not provided, the package will use the value fromprocess.env.RENDER9_OTP_KEY.
Returns:
A dictionary containing:
error(bool): Indicates if there was an error.message(str): A message describing the result.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub if you have any suggestions or improvements.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
This README provides a clear guide for developers to install, use, and contribute to the render9 Python package.
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 render9-0.0.112.tar.gz.
File metadata
- Download URL: render9-0.0.112.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82bff524248230f6ea15e86b2558dc07b1f0a78106e6a279d48a303349f09cf6
|
|
| MD5 |
9545dcbd5666c4675dbd44305fe16e95
|
|
| BLAKE2b-256 |
58f69325b2ef7f78da1da7137ab7d878502a90ede5f3f39026d2085320b4f50e
|
File details
Details for the file render9-0.0.112-py3-none-any.whl.
File metadata
- Download URL: render9-0.0.112-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef64f8cbcd485a905c03d9f0107fb697ab3bb322f8ad2d6887010a0dd9dd3e14
|
|
| MD5 |
f667806328e4d0de5718cb997e5d8717
|
|
| BLAKE2b-256 |
791eac7f9272fbf3f05bfe81d106d0f57457572e70cb8f399733eb48c04c5a19
|