Skip to main content

whatsapp-linkify

PyPI version License: MIT Downloads LinkedIn

whatsapp-linkify is a Python package that transforms phone numbers into direct WhatsApp chat links. It allows users to input a phone number or text containing phone numbers, and processes this input to generate structured WhatsApp chat URLs. This is especially useful for businesses, customer support teams, or anyone needing quick access to WhatsApp chats without manually formatting links.

Installation

Install the package via pip:

pip install whatsapp_linkify

Usage

Here's a basic example of how to use the package:

from whatsapp_linkify import whatsapp_linkify

results = whatsapp_linkify(
    user_input="Call me at +1234567890 or +19876543210.",
)
print(results)

Parameters

  • user_input: str
    The input text containing phone numbers to process.

  • llm: Optional[BaseChatModel]
    An optional language model instance to use. If not provided, the default ChatLLM7 from langchain_llm7 is used.

  • api_key: Optional[str]
    An optional API key for LLM7. If not provided, it will be fetched from the environment variable LLM7_API_KEY.

LLM Compatibility and Customization

The package uses ChatLLM7 from the langchain_llm7 package (https://pypi.org/project/langchain-llm7/).
Developers can pass their own language model instances to whatsapp_linkify, supporting models such as:

  • OpenAI (via langchain_openai.ChatOpenAI)

    from langchain_openai import ChatOpenAI
    from whatsapp_linkify import whatsapp_linkify
    
    llm = ChatOpenAI()
    response = whatsapp_linkify(user_input, llm=llm)
    
  • Anthropic (via langchain_anthropic.ChatAnthropic)

    from langchain_anthropic import ChatAnthropic
    from whatsapp_linkify import whatsapp_linkify
    
    llm = ChatAnthropic()
    response = whatsapp_linkify(user_input, llm=llm)
    
  • Google Generative AI (via langchain_google_genai.ChatGoogleGenerativeAI)

    from langchain_google_genai import ChatGoogleGenerativeAI
    from whatsapp_linkify import whatsapp_linkify
    
    llm = ChatGoogleGenerativeAI()
    response = whatsapp_linkify(user_input, llm=llm)
    

The default rate limits for LLM7’s free tier are sufficient for most use cases. For higher limits, users can obtain an API key from https://token.llm7.io/ and pass it via the api_key parameter or environment variable.

License

This project is maintained by Eugene Evstafev.
Author email: hi@euegne.plus
GitHub profile: chigwell

Issues

For issues and feature requests, please visit:
https://github.com/chigwell/whatsapp-linkify/issues

Metadata

Release files for whatsapp-linkify 2025.12.21184318

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

Source distribution (sdist)

Source distribution for whatsapp-linkify 2025.12.21184318
File Size Uploaded
whatsapp_linkify-2025.12.21184318.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for whatsapp-linkify 2025.12.21184318
File Interpreter ABI Platform
whatsapp_linkify-2025.12.21184318-py3-none-any.whl Python 3 none any Details

Total release size: 10.2 kB

Release files / whatsapp_linkify-2025.12.21184318.tar.gz

Download URL whatsapp_linkify-2025.12.21184318.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b4d3c398af748dadcc8b77cba2430c543bee93ea0a6ee09cd686cfea7ab5cbda
BLAKE2b-256 checksum
How to use checksums
dd7682a398e87a650624890bf4ca03a0bcc60cfe40acd54243efbcc262c0fd17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / whatsapp_linkify-2025.12.21184318-py3-none-any.whl

Download URL whatsapp_linkify-2025.12.21184318-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f67febb6ebe83c1814b7ca9bfe7cff1100fcc2ac0e0f6600e1d08dd963db16de
BLAKE2b-256 checksum
How to use checksums
4813818ba055ed795a52b6cedafe287173c7a6a6fc9fb8e4a32769e531e65d9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

2025.12.21184318 This release

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