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
- Sign up at chanify.online
- Go to Publisher → My Bots → Add Bot
- Copy your
chanify_live_API key from Step 3
Links
License
MIT
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chanify-0.1.0.tar.gz | 2.3 kB | Without provenance | Details for chanify-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chanify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for chanify-0.1.0-py3-none-any.whl |
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
|
Security for chanify 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.