Skip to main content

Getting Started with Hypersender SDK

This guide will walk you through the process of installing and configuring the Hypersender Python SDK for your Python application, whether it is a Django, Flask, or FastAPI app or a simple script.

Prerequisites

Before you begin, ensure you have the following:
  • Python 3.10 or higher: The SDK has a single dependency, httpx.
  • pip (or uv, Poetry): For package management and dependency resolution
  • Hypersender account: Sign up at Hypersender to obtain your API key and Instance ID.
You can find your API key and Instance ID in the Hypersender dashboard
Hypersender Dashboard API Key

Installation

1

Install the SDK via pip

Run the following command in your terminal to install the Hypersender Python SDK:
After installation, you can verify the package is installed with pip show hypersender.
2

Configure Environment Variables

The SDK reads its credentials from environment variables, using the same names as the Laravel package. Set the variables for the APIs you use: WhatsApp, SMS, OTP, or any mix of them.For WhatsApp API, set the following environment variables in your .env file:
Learn how to get the Hypersender whatsapp API token and Instance ID from Dashboard: Demo Link.
For SMS API, set the following environment variables in your .env file:
Learn how to get the Hypersender SMS API token and Instance ID from the dashboard: Demo Link.
For OTP API, set the following environment variables in your .env file:
For Enterprise instance management (Enterprise accounts only), set:
Python does not read .env files on its own. Install python-dotenv (pip install python-dotenv) and call load_dotenv() before you create the client, or export the variables in your shell or hosting platform.
3

Send your first message

Import Hypersender, create a client, and call the API you need. The client picks up the environment variables when you create it.

Configure in code instead of environment variables

If you can’t use environment variables, pass the credentials when you create the client:
To work with more than one account at the same time, create a Hypersender(...) client for each one. Each client has the same whatsapp, sms, otp, and enterprise attributes.

You’re all set!

You have successfully installed and configured the Hypersender Python SDK in your application. You can now start using the SDK to send messages and manage your communications.
Last modified on November 24, 2026