Skip to main content

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 from process.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

render9-0.0.109.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

render9-0.0.109-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file render9-0.0.109.tar.gz.

File metadata

  • Download URL: render9-0.0.109.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for render9-0.0.109.tar.gz
Algorithm Hash digest
SHA256 5a4743549a507d0699bad366580aa5de7a2b7d3aec5ce535f18b83c83a1dd094
MD5 e798c557dbac1a6dec47a856f0aa4e99
BLAKE2b-256 f103a54867433dd53ee61af890df69e34f8e15d552516bd8f27ad86f9dcd572d

See more details on using hashes here.

File details

Details for the file render9-0.0.109-py3-none-any.whl.

File metadata

  • Download URL: render9-0.0.109-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for render9-0.0.109-py3-none-any.whl
Algorithm Hash digest
SHA256 bab715220626ae1f0d3ce78b6b6ab221d4580d65d490ed413bef8acc72fdea74
MD5 f29f9d01456aa2f3cef0204d5e49c36d
BLAKE2b-256 7f293956f1a5c4407537277e339d6e7a36c51abf10670f6f6a1a2667fcebee16

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