Skip to main content

PyPI - Python Version PyPI Code style: black GitHub

Alt text Welcome to Autoconv!
A Python package that help you build complex Telegram bot conversations with buttons, actions and much more.
This package is built over the awesome Python-Telegram-Bot!

Setup

You can find the package on PyPi (pip).

pip3 install telegram-autoconv

Requirements

Examples

I know you want examples, in fact there is a beautiful folder with some examples.
In the table below, you can find an example for every functions in the module.
In addition to that, there is a live Telegram bot to showcase every features, @AutoBot.

Function Example Documentation
add_keybord keyboards.py State
add_text actions.py State
add_dynamic_text actions.py State
add_action actions.py State
add_dynamic_keybord keyboards.py State
add_custom_keyboard keyboards.py State
add_dynamic_routes keyboards.py State
add_dynamic_list dynamic_list.py State
add_custom_handler handlers.py State
set_long_task actions.py State
add_refresh_auth authorization.py State
add_operation_buttons keyboards.py State
Conversation conversation.py Conversation
add_routes conversation.py Conversation
set_defaults defaults.py Conversation
add_authorized_users authorization.py Conversation
state_messages texts.py Texts Guide
set_timed_function async.py AutoConvHandler
stop_timed_function async.py AutoConvHandler
send_autodestroy_message async.py AutoConvHandler
restart autoconv_handler.py AutoConvHandler
force_state autoconv_handler.py AutoConvHandler
save tdata.py TelegamData
add tdata.py TelegamData
get_or_set tdata.py TelegamData

Persistence

If you want to use persistence in your bot, Autoconv provides a simple persistence based on PicklePersistence.
The normal PicklePersistence doesn't work, due to an instance of a Telegram.Message in the user_data, this persistence uses a workaround.

from autoconv.utils.persistence import AutoconvPersistence
persistence = AutoconvPersistence(filename="bot_persistence", bot_token=BOT_TOKEN)
updater = Updater(BOT_TOKEN, persistence=persistence)

WARNING! This persistence will save the bot token in a pickle file.

Documentation

Do you want to read? I got you cover, baby!
No more than a little documentation in the Wiki.

Real World Example

I have a simple movies info Telegram bot publicy available.
You can interact with the Bot (the response time it kinda high, caused by very slow connection) PopCorn (sorry for the italian).
The code (except for the config files) is in this GIST.


Do you want to help me?

If you want to contribute you are welcome! I don't have guidelines for now, but contact me on Telegram @Mortafix.
If you want to donate, thank you so much for your support!
Buy Me A Coffee

Metadata

Release files for telegram-autoconv 0.0.72

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

Source distribution (sdist)

Source distribution for telegram-autoconv 0.0.72
File Size Uploaded Provenance Actions
telegram-autoconv-0.0.72.tar.gz 16.6 kB Without provenance Details for telegram-autoconv-0.0.72.tar.gz

Release files / telegram-autoconv-0.0.72.tar.gz

Download URL telegram-autoconv-0.0.72.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
884d4e0881844c8caae5be8bf49373423caeb10b42fa50d84f5a4740c1ffce20
BLAKE2b-256 checksum
How to use checksums
144d5419a1199b85164373006c0dd440bfda0aa4a6a278d6bbc7bc1ce8c5425e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for telegram-autoconv 0.0.72

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.

Release history Release notifications | RSS feed

This release

0.0.72 This release

1 release file No provenance

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