PRocket integration library for Telegram bots
Project description
PRocket API Library
This package is prepared for simple installation as:
python -m pip install procketapi
The library already handles PRocket task sessions for you: it opens sponsor links through the PRocket redirect URL and sends the matching session_token during verification.
For the service owner
You run the PRocket backend on your own server:
python main.pypython -m integration_service.api_server
The connected bot owner does not run your backend. They only:
- get an approved API key
- get your public
base_url - install your library
- add the integration into their own bot
Recommended import
from procketapi import PRocketAiogramIntegration
Compatibility imports also work:
from procket_integration import PRocketAiogramIntegration
from procket_integration_sdk import PRocketAiogramIntegration
Easy aiogram integration
from aiogram import F, Router
from aiogram.types import CallbackQuery, Message
from procketapi import PRocketAiogramIntegration
router = Router()
integration = PRocketAiogramIntegration(
api_key="YOUR_API_KEY",
base_url="https://your-public-api.example.com",
callback_prefix="sponsor",
currency="RUB",
)
@router.message(F.text == "📢 Задания от спонсоров")
async def sponsor_tasks(message: Message):
await integration.show_tasks(message)
@router.callback_query(F.data.startswith("sponsor:"))
async def sponsor_callbacks(call: CallbackQuery):
await integration.handle_callback(call)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file procketapi-0.4.1.tar.gz.
File metadata
- Download URL: procketapi-0.4.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9578d9fce983f16275d71e20faf7e79c6c853cc7f8d49884275008b76ab264dc
|
|
| MD5 |
4cce2f3525b248531846abdb19832424
|
|
| BLAKE2b-256 |
7d49dc6279123be81fc22f4e8115b5f0ca127aae910caec02c84e164db9b9c9b
|
File details
Details for the file procketapi-0.4.1-py3-none-any.whl.
File metadata
- Download URL: procketapi-0.4.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8f17e06eef050948d2c48a12559dc10c919a4454951358422e68ca78237846e
|
|
| MD5 |
52b86222153c7f138b73cd13886c5885
|
|
| BLAKE2b-256 |
66e05e53f5b7a48493e2323d9d32d8651bffb72f71b371621eeaf85e6ec2fd48
|