Skip to main content

Chanify Python SDK

Official Python SDK for Chanify — the ad network for Telegram bots, channels, and Mini Apps.

Installation

pip install chanify

Quick Start

from chanify import Chanify

chanify = Chanify("chanify_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

# After each bot response — add one line:
await chanify.show_ad(chat_id=message.chat.id, user=message.from_user)

Usage with aiogram 3.x

from aiogram import Router
from aiogram.filters import CommandStart
from aiogram.types import Message
from chanify import Chanify

router = Router()
chanify = Chanify("chanify_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

@router.message(CommandStart())
async def start(message: Message):
    await message.answer("Hello! How can I help?")
    await chanify.show_ad(chat_id=message.chat.id, user=message.from_user)

Full API

await chanify.show_ad(
    chat_id=message.chat.id,
    user=message.from_user,
    country="US",        # optional — if your bot knows the user's country
    after_delay=1.5      # seconds to wait before showing ad, default 1.0
)
Parameter Type Required Description
chat_id int Yes Telegram chat ID
user object No Telegram user object — passes language, Premium status
country str No ISO 3166-1 alpha-2 country code
after_delay float No Delay in seconds before the ad is sent (default: 1.0)

Returns True if an ad was shown, False otherwise. Never raises exceptions — safe to call without try/except.

Requirements

  • Python 3.8+
  • httpx >= 0.24.0

Get your API key

  1. Sign up at chanify.online
  2. Go to Publisher → My Bots → Add Bot
  3. Copy your chanify_live_ API key from Step 3

Links

License

MIT

Release files for chanify 0.1.0

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

Source distribution (sdist)

Source distribution for chanify 0.1.0
File Size Uploaded
chanify-0.1.0.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chanify 0.1.0
File Interpreter ABI Platform
chanify-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / chanify-0.1.0.tar.gz

Download URL chanify-0.1.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ae6088c7b83696a54d6ebdcab6844343c1e92f2c7557f1768bb47a6933aa63ac
BLAKE2b-256 checksum
How to use checksums
f125b4daab372d8958d7090d7f6cb86c12f8737a970c1a98177bc1d1889bd131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / chanify-0.1.0-py3-none-any.whl

Download URL chanify-0.1.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b927f209be9340c22e636bda224b8bb732b93a1ea7ce9a5cedf6883341aa127
BLAKE2b-256 checksum
How to use checksums
b3bef274e9e3d8ae882fb35890ec05b2ff15025ee771d1db78d1cecad5a392c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.1.0 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