spluspy 2.0.1__tar.gz → 2.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- spluspy-2.0.3/CHANGELOG.md +132 -0
- spluspy-2.0.3/CONTRIBUTING.md +81 -0
- spluspy-2.0.3/Dockerfile +21 -0
- spluspy-2.0.3/LICENSE +21 -0
- spluspy-2.0.3/MANIFEST.in +7 -0
- spluspy-2.0.3/PKG-INFO +1084 -0
- spluspy-2.0.3/README.md +1030 -0
- spluspy-2.0.3/README.rst +504 -0
- spluspy-2.0.3/examples/01_hello_bot.py +19 -0
- spluspy-2.0.3/examples/02_echo_bot.py +18 -0
- spluspy-2.0.3/examples/03_command_bot.py +42 -0
- spluspy-2.0.3/examples/04_private_only.py +19 -0
- spluspy-2.0.3/examples/05_group_only.py +19 -0
- spluspy-2.0.3/examples/06_regex_bot.py +26 -0
- spluspy-2.0.3/examples/07_user_filter.py +28 -0
- spluspy-2.0.3/examples/08_combined_filters.py +49 -0
- spluspy-2.0.3/examples/09_inline_keyboard.py +37 -0
- spluspy-2.0.3/examples/10_reply_keyboard.py +35 -0
- spluspy-2.0.3/examples/11_message_actions.py +41 -0
- spluspy-2.0.3/examples/12_media_bot.py +38 -0
- spluspy-2.0.3/examples/13_fsm_bot.py +63 -0
- spluspy-2.0.3/examples/14_plugin_bot.py +36 -0
- spluspy-2.0.3/examples/15_middleware_bot.py +41 -0
- spluspy-2.0.3/examples/16_scheduler_bot.py +34 -0
- spluspy-2.0.3/examples/17_conversation.py +26 -0
- spluspy-2.0.3/examples/18_chat_management.py +49 -0
- spluspy-2.0.3/examples/19_event_types.py +61 -0
- spluspy-2.0.3/examples/20_sync_bot.py +25 -0
- spluspy-2.0.3/examples/21_album_handler.py +19 -0
- spluspy-2.0.3/examples/22_download_bot.py +26 -0
- spluspy-2.0.3/examples/23_url_button.py +25 -0
- spluspy-2.0.3/examples/24_string_session.py +34 -0
- spluspy-2.0.3/examples/25_error_handling.py +58 -0
- spluspy-2.0.3/examples/25_working_bot.py +63 -0
- spluspy-2.0.3/examples/26_message_entities.py +33 -0
- spluspy-2.0.3/examples/27_search_messages.py +29 -0
- spluspy-2.0.3/examples/28_poll_bot.py +24 -0
- spluspy-2.0.3/examples/29_dice_bot.py +31 -0
- spluspy-2.0.3/examples/30_cache_bot.py +27 -0
- spluspy-2.0.3/examples/31_reaction_bot.py +31 -0
- spluspy-2.0.3/examples/32_mark_read_bot.py +27 -0
- spluspy-2.0.3/examples/33_context_manager.py +22 -0
- spluspy-2.0.3/examples/34_user_info.py +23 -0
- spluspy-2.0.3/examples/35_chat_info.py +24 -0
- spluspy-2.0.3/examples/36_forward_copy.py +33 -0
- spluspy-2.0.3/examples/37_admin_bot.py +53 -0
- spluspy-2.0.3/examples/38_media_filters.py +38 -0
- spluspy-2.0.3/examples/39_status_bot.py +21 -0
- spluspy-2.0.3/examples/40_delete_detection.py +19 -0
- spluspy-2.0.3/examples/41_read_detection.py +19 -0
- spluspy-2.0.3/examples/42_raw_events.py +18 -0
- spluspy-2.0.3/examples/43_poll_handler.py +19 -0
- spluspy-2.0.3/examples/44_reaction_handler.py +18 -0
- spluspy-2.0.3/examples/45_typing_handler.py +18 -0
- spluspy-2.0.3/examples/46_get_messages.py +30 -0
- spluspy-2.0.3/examples/47_iter_messages.py +22 -0
- spluspy-2.0.3/examples/48_get_members.py +21 -0
- spluspy-2.0.3/examples/49_resolve_username.py +24 -0
- spluspy-2.0.3/examples/50_invoke.py +20 -0
- spluspy-2.0.3/pyproject.toml +135 -0
- spluspy-2.0.3/rename_splusthon.py +280 -0
- spluspy-2.0.3/spluspy/__init__.py +123 -0
- spluspy-2.0.3/spluspy/__version__.py +7 -0
- spluspy-2.0.3/spluspy/cli.py +116 -0
- spluspy-2.0.3/spluspy/client/__init__.py +5 -0
- spluspy-2.0.3/spluspy/client/client.py +1245 -0
- spluspy-2.0.3/spluspy/client/conversation.py +80 -0
- spluspy-2.0.3/spluspy/compat.py +51 -0
- spluspy-2.0.3/spluspy/config.py +125 -0
- spluspy-2.0.3/spluspy/errors/__init__.py +43 -0
- spluspy-2.0.3/spluspy/errors/exceptions.py +93 -0
- spluspy-2.0.3/spluspy/events/__init__.py +35 -0
- spluspy-2.0.3/spluspy/events/album.py +57 -0
- spluspy-2.0.3/spluspy/events/base.py +165 -0
- spluspy-2.0.3/spluspy/events/callback.py +61 -0
- spluspy-2.0.3/spluspy/events/chat_action.py +113 -0
- spluspy-2.0.3/spluspy/events/edited.py +46 -0
- spluspy-2.0.3/spluspy/events/inline.py +52 -0
- spluspy-2.0.3/spluspy/events/message.py +247 -0
- spluspy-2.0.3/spluspy/events/message_deleted.py +42 -0
- spluspy-2.0.3/spluspy/events/message_read.py +41 -0
- spluspy-2.0.3/spluspy/events/user_update.py +54 -0
- spluspy-2.0.3/spluspy/filters/__init__.py +173 -0
- spluspy-2.0.3/spluspy/filters/filters.py +599 -0
- spluspy-2.0.3/spluspy/fsm/__init__.py +10 -0
- spluspy-2.0.3/spluspy/fsm/state.py +264 -0
- spluspy-2.0.3/spluspy/middleware/__init__.py +5 -0
- spluspy-2.0.3/spluspy/middleware/base.py +101 -0
- spluspy-2.0.3/spluspy/middleware/rate_limit.py +66 -0
- spluspy-2.0.3/spluspy/network/__init__.py +17 -0
- spluspy-2.0.3/spluspy/network/client.py +396 -0
- spluspy-2.0.3/spluspy/network/connection.py +167 -0
- spluspy-2.0.3/spluspy/network/http_client.py +355 -0
- spluspy-2.0.3/spluspy/network/mtproto.py +484 -0
- spluspy-2.0.3/spluspy/network/spluspy_adapter.py +133 -0
- spluspy-2.0.3/spluspy/network/telethon_adapter.py +153 -0
- spluspy-2.0.3/spluspy/network/transport.py +282 -0
- spluspy-2.0.3/spluspy/plugins/__init__.py +5 -0
- spluspy-2.0.3/spluspy/plugins/loader.py +150 -0
- spluspy-2.0.3/spluspy/scheduler/__init__.py +5 -0
- spluspy-2.0.3/spluspy/scheduler/scheduler.py +151 -0
- spluspy-2.0.3/spluspy/session/__init__.py +13 -0
- spluspy-2.0.3/spluspy/session/base.py +70 -0
- spluspy-2.0.3/spluspy/session/memory.py +58 -0
- spluspy-2.0.3/spluspy/session/sqlite.py +331 -0
- spluspy-2.0.3/spluspy/session/string.py +87 -0
- spluspy-2.0.3/spluspy/storage/__init__.py +44 -0
- spluspy-2.0.3/spluspy/storage/base.py +39 -0
- spluspy-2.0.3/spluspy/storage/memory.py +52 -0
- spluspy-2.0.3/spluspy/storage/postgres.py +183 -0
- spluspy-2.0.3/spluspy/storage/redis.py +140 -0
- spluspy-2.0.3/spluspy/storage/sqlite.py +115 -0
- spluspy-2.0.3/spluspy/sync/__init__.py +17 -0
- spluspy-2.0.3/spluspy/sync/client.py +267 -0
- spluspy-2.0.3/spluspy/types/__init__.py +67 -0
- spluspy-2.0.3/spluspy/types/bot.py +254 -0
- spluspy-2.0.3/spluspy/types/chat.py +165 -0
- spluspy-2.0.3/spluspy/types/enums.py +63 -0
- spluspy-2.0.3/spluspy/types/media.py +227 -0
- spluspy-2.0.3/spluspy/types/message.py +362 -0
- spluspy-2.0.3/spluspy/types/objects.py +110 -0
- spluspy-2.0.3/spluspy/types/user.py +88 -0
- spluspy-2.0.3/spluspy/utils/__init__.py +28 -0
- spluspy-2.0.3/spluspy/utils/batch.py +178 -0
- spluspy-2.0.3/spluspy/utils/cache.py +215 -0
- spluspy-2.0.3/spluspy/utils/file_transfer.py +258 -0
- spluspy-2.0.3/spluspy/utils/helpers.py +62 -0
- spluspy-2.0.3/spluspy/utils/logger.py +284 -0
- spluspy-2.0.3/spluspy/utils/rate_limiter.py +211 -0
- spluspy-2.0.3/spluspy/utils/version_check.py +86 -0
- spluspy-2.0.3/tab.py +401 -0
- spluspy-2.0.3/tempCodeRunnerFile.py +6 -0
- spluspy-2.0.3/test_handlers.py +85 -0
- spluspy-2.0.3/tests/.vscode/PythonImportHelper-v2-Completion.json +843 -0
- spluspy-2.0.3/tests/__init__.py +1 -0
- spluspy-2.0.3/tests/test_client.py +476 -0
- spluspy-2.0.3/tests/test_filters.py +194 -0
- spluspy-2.0.3/tests/test_fsm.py +92 -0
- spluspy-2.0.3/tests/test_fsm_enhanced.py +106 -0
- spluspy-2.0.3/tests/test_middleware.py +67 -0
- spluspy-2.0.3/tests/test_rate_limiter.py +63 -0
- spluspy-2.0.3/tests/test_scheduler.py +68 -0
- spluspy-2.0.3/tests/test_session.py +180 -0
- spluspy-2.0.3/tests/test_storage.py +82 -0
- spluspy-2.0.3/tests/test_storage_backends.py +52 -0
- spluspy-2.0.3/tests/test_types.py +171 -0
- spluspy-2.0.3/tests/test_utils.py +96 -0
- spluspy-2.0.1/PKG-INFO +0 -173
- spluspy-2.0.1/README.rst +0 -133
- spluspy-2.0.1/setup.cfg +0 -4
- spluspy-2.0.1/setup.py +0 -258
- spluspy-2.0.1/spluspy/__init__.py +0 -22
- spluspy-2.0.1/spluspy/_updates/__init__.py +0 -3
- spluspy-2.0.1/spluspy/_updates/entitycache.py +0 -59
- spluspy-2.0.1/spluspy/_updates/messagebox.py +0 -826
- spluspy-2.0.1/spluspy/_updates/session.py +0 -195
- spluspy-2.0.1/spluspy/client/__init__.py +0 -25
- spluspy-2.0.1/spluspy/client/account.py +0 -243
- spluspy-2.0.1/spluspy/client/auth.py +0 -721
- spluspy-2.0.1/spluspy/client/bots.py +0 -72
- spluspy-2.0.1/spluspy/client/buttons.py +0 -101
- spluspy-2.0.1/spluspy/client/chats.py +0 -1582
- spluspy-2.0.1/spluspy/client/dialogs.py +0 -606
- spluspy-2.0.1/spluspy/client/downloads.py +0 -1092
- spluspy-2.0.1/spluspy/client/messageparse.py +0 -233
- spluspy-2.0.1/spluspy/client/messages.py +0 -1524
- spluspy-2.0.1/spluspy/client/ratelimiter.py +0 -188
- spluspy-2.0.1/spluspy/client/soroushclient.py +0 -997
- spluspy-2.0.1/spluspy/client/telegrambaseclient.py +0 -1081
- spluspy-2.0.1/spluspy/client/updates.py +0 -717
- spluspy-2.0.1/spluspy/client/uploads.py +0 -867
- spluspy-2.0.1/spluspy/client/users.py +0 -632
- spluspy-2.0.1/spluspy/crypto/__init__.py +0 -10
- spluspy-2.0.1/spluspy/crypto/aes.py +0 -225
- spluspy-2.0.1/spluspy/crypto/aesctr.py +0 -130
- spluspy-2.0.1/spluspy/crypto/authkey.py +0 -63
- spluspy-2.0.1/spluspy/crypto/cdndecrypter.py +0 -109
- spluspy-2.0.1/spluspy/crypto/factorization.py +0 -67
- spluspy-2.0.1/spluspy/crypto/libssl.py +0 -138
- spluspy-2.0.1/spluspy/crypto/rsa.py +0 -278
- spluspy-2.0.1/spluspy/custom.py +0 -1
- spluspy-2.0.1/spluspy/errors/__init__.py +0 -46
- spluspy-2.0.1/spluspy/errors/common.py +0 -180
- spluspy-2.0.1/spluspy/errors/rpcbaseerrors.py +0 -135
- spluspy-2.0.1/spluspy/errors/rpcerrorlist.py +0 -5356
- spluspy-2.0.1/spluspy/events/__init__.py +0 -150
- spluspy-2.0.1/spluspy/events/album.py +0 -343
- spluspy-2.0.1/spluspy/events/callbackquery.py +0 -345
- spluspy-2.0.1/spluspy/events/chataction.py +0 -458
- spluspy-2.0.1/spluspy/events/common.py +0 -186
- spluspy-2.0.1/spluspy/events/decorators.py +0 -362
- spluspy-2.0.1/spluspy/events/inlinequery.py +0 -247
- spluspy-2.0.1/spluspy/events/messagedeleted.py +0 -57
- spluspy-2.0.1/spluspy/events/messageedited.py +0 -52
- spluspy-2.0.1/spluspy/events/messageread.py +0 -143
- spluspy-2.0.1/spluspy/events/newmessage.py +0 -223
- spluspy-2.0.1/spluspy/events/raw.py +0 -53
- spluspy-2.0.1/spluspy/events/userupdate.py +0 -310
- spluspy-2.0.1/spluspy/extensions/__init__.py +0 -6
- spluspy-2.0.1/spluspy/extensions/binaryreader.py +0 -207
- spluspy-2.0.1/spluspy/extensions/html.py +0 -203
- spluspy-2.0.1/spluspy/extensions/markdown.py +0 -193
- spluspy-2.0.1/spluspy/extensions/messagepacker.py +0 -122
- spluspy-2.0.1/spluspy/functions.py +0 -1
- spluspy-2.0.1/spluspy/helpers.py +0 -515
- spluspy-2.0.1/spluspy/hints.py +0 -72
- spluspy-2.0.1/spluspy/network/__init__.py +0 -14
- spluspy-2.0.1/spluspy/network/authenticator.py +0 -212
- spluspy-2.0.1/spluspy/network/connection/__init__.py +0 -13
- spluspy-2.0.1/spluspy/network/connection/connection.py +0 -455
- spluspy-2.0.1/spluspy/network/connection/http.py +0 -39
- spluspy-2.0.1/spluspy/network/connection/tcpabridged.py +0 -33
- spluspy-2.0.1/spluspy/network/connection/tcpfull.py +0 -58
- spluspy-2.0.1/spluspy/network/connection/tcpintermediate.py +0 -46
- spluspy-2.0.1/spluspy/network/connection/tcpmtproxy.py +0 -165
- spluspy-2.0.1/spluspy/network/connection/tcpobfuscated.py +0 -62
- spluspy-2.0.1/spluspy/network/connection/websocket.py +0 -313
- spluspy-2.0.1/spluspy/network/mtprotoplainsender.py +0 -56
- spluspy-2.0.1/spluspy/network/mtprotosender.py +0 -951
- spluspy-2.0.1/spluspy/network/mtprotostate.py +0 -285
- spluspy-2.0.1/spluspy/network/requeststate.py +0 -19
- spluspy-2.0.1/spluspy/password.py +0 -194
- spluspy-2.0.1/spluspy/requestiter.py +0 -134
- spluspy-2.0.1/spluspy/sessions/__init__.py +0 -4
- spluspy-2.0.1/spluspy/sessions/abstract.py +0 -172
- spluspy-2.0.1/spluspy/sessions/memory.py +0 -263
- spluspy-2.0.1/spluspy/sessions/sqlite.py +0 -388
- spluspy-2.0.1/spluspy/sessions/string.py +0 -75
- spluspy-2.0.1/spluspy/sync.py +0 -74
- spluspy-2.0.1/spluspy/tl/__init__.py +0 -1
- spluspy-2.0.1/spluspy/tl/alltlobjects.py +0 -1696
- spluspy-2.0.1/spluspy/tl/core/__init__.py +0 -26
- spluspy-2.0.1/spluspy/tl/core/gzippacked.py +0 -48
- spluspy-2.0.1/spluspy/tl/core/messagecontainer.py +0 -47
- spluspy-2.0.1/spluspy/tl/core/rpcresult.py +0 -35
- spluspy-2.0.1/spluspy/tl/core/tlmessage.py +0 -34
- spluspy-2.0.1/spluspy/tl/custom/__init__.py +0 -14
- spluspy-2.0.1/spluspy/tl/custom/adminlogevent.py +0 -475
- spluspy-2.0.1/spluspy/tl/custom/button.py +0 -346
- spluspy-2.0.1/spluspy/tl/custom/chatgetter.py +0 -150
- spluspy-2.0.1/spluspy/tl/custom/conversation.py +0 -529
- spluspy-2.0.1/spluspy/tl/custom/dialog.py +0 -161
- spluspy-2.0.1/spluspy/tl/custom/draft.py +0 -191
- spluspy-2.0.1/spluspy/tl/custom/file.py +0 -146
- spluspy-2.0.1/spluspy/tl/custom/forward.py +0 -51
- spluspy-2.0.1/spluspy/tl/custom/inlinebuilder.py +0 -450
- spluspy-2.0.1/spluspy/tl/custom/inlineresult.py +0 -176
- spluspy-2.0.1/spluspy/tl/custom/inlineresults.py +0 -83
- spluspy-2.0.1/spluspy/tl/custom/inputsizedfile.py +0 -9
- spluspy-2.0.1/spluspy/tl/custom/message.py +0 -1243
- spluspy-2.0.1/spluspy/tl/custom/messagebutton.py +0 -154
- spluspy-2.0.1/spluspy/tl/custom/participantpermissions.py +0 -138
- spluspy-2.0.1/spluspy/tl/custom/qrlogin.py +0 -119
- spluspy-2.0.1/spluspy/tl/custom/sendergetter.py +0 -102
- spluspy-2.0.1/spluspy/tl/custom/types.py +0 -38
- spluspy-2.0.1/spluspy/tl/functions/__init__.py +0 -452
- spluspy-2.0.1/spluspy/tl/functions/account.py +0 -1581
- spluspy-2.0.1/spluspy/tl/functions/auth.py +0 -593
- spluspy-2.0.1/spluspy/tl/functions/bots.py +0 -112
- spluspy-2.0.1/spluspy/tl/functions/channels.py +0 -1672
- spluspy-2.0.1/spluspy/tl/functions/chatlists.py +0 -325
- spluspy-2.0.1/spluspy/tl/functions/conference.py +0 -437
- spluspy-2.0.1/spluspy/tl/functions/contacts.py +0 -476
- spluspy-2.0.1/spluspy/tl/functions/folders.py +0 -44
- spluspy-2.0.1/spluspy/tl/functions/help.py +0 -259
- spluspy-2.0.1/spluspy/tl/functions/langpack.py +0 -146
- spluspy-2.0.1/spluspy/tl/functions/messages.py +0 -5469
- spluspy-2.0.1/spluspy/tl/functions/payments.py +0 -292
- spluspy-2.0.1/spluspy/tl/functions/phone.py +0 -809
- spluspy-2.0.1/spluspy/tl/functions/photos.py +0 -282
- spluspy-2.0.1/spluspy/tl/functions/premium.py +0 -152
- spluspy-2.0.1/spluspy/tl/functions/stats.py +0 -300
- spluspy-2.0.1/spluspy/tl/functions/stories.py +0 -765
- spluspy-2.0.1/spluspy/tl/functions/thirdParty.py +0 -67
- spluspy-2.0.1/spluspy/tl/functions/updates.py +0 -139
- spluspy-2.0.1/spluspy/tl/functions/upload.py +0 -168
- spluspy-2.0.1/spluspy/tl/functions/users.py +0 -170
- spluspy-2.0.1/spluspy/tl/patched/__init__.py +0 -20
- spluspy-2.0.1/spluspy/tl/tlobject.py +0 -222
- spluspy-2.0.1/spluspy/tl/types/__init__.py +0 -40015
- spluspy-2.0.1/spluspy/tl/types/account.py +0 -1096
- spluspy-2.0.1/spluspy/tl/types/auth.py +0 -809
- spluspy-2.0.1/spluspy/tl/types/bots.py +0 -43
- spluspy-2.0.1/spluspy/tl/types/channels.py +0 -232
- spluspy-2.0.1/spluspy/tl/types/chatlists.py +0 -273
- spluspy-2.0.1/spluspy/tl/types/conference.py +0 -69
- spluspy-2.0.1/spluspy/tl/types/contacts.py +0 -478
- spluspy-2.0.1/spluspy/tl/types/help.py +0 -1206
- spluspy-2.0.1/spluspy/tl/types/messages.py +0 -3000
- spluspy-2.0.1/spluspy/tl/types/payments.py +0 -633
- spluspy-2.0.1/spluspy/tl/types/phone.py +0 -313
- spluspy-2.0.1/spluspy/tl/types/photos.py +0 -135
- spluspy-2.0.1/spluspy/tl/types/premium.py +0 -209
- spluspy-2.0.1/spluspy/tl/types/stats.py +0 -368
- spluspy-2.0.1/spluspy/tl/types/stickers.py +0 -35
- spluspy-2.0.1/spluspy/tl/types/storage.py +0 -197
- spluspy-2.0.1/spluspy/tl/types/stories.py +0 -317
- spluspy-2.0.1/spluspy/tl/types/thirdParty.py +0 -94
- spluspy-2.0.1/spluspy/tl/types/update.py +0 -39
- spluspy-2.0.1/spluspy/tl/types/updates.py +0 -447
- spluspy-2.0.1/spluspy/tl/types/upload.py +0 -196
- spluspy-2.0.1/spluspy/tl/types/users.py +0 -131
- spluspy-2.0.1/spluspy/types.py +0 -1
- spluspy-2.0.1/spluspy/updater.py +0 -72
- spluspy-2.0.1/spluspy/utils.py +0 -1593
- spluspy-2.0.1/spluspy/version.py +0 -3
- spluspy-2.0.1/spluspy.egg-info/PKG-INFO +0 -173
- spluspy-2.0.1/spluspy.egg-info/SOURCES.txt +0 -162
- spluspy-2.0.1/spluspy.egg-info/dependency_links.txt +0 -1
- spluspy-2.0.1/spluspy.egg-info/requires.txt +0 -6
- spluspy-2.0.1/spluspy.egg-info/top_level.txt +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to SplusPy will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
|
+
|
|
8
|
+
## [3.0.0] - 2026-07-10
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
#### Security
|
|
13
|
+
- Removed insecure AES-ECB fallback for IGE encryption — PyCryptodome is now required
|
|
14
|
+
- Removed hardcoded API credentials — `api_id` and `api_hash` must be provided by user
|
|
15
|
+
|
|
16
|
+
#### Core
|
|
17
|
+
- Complete Diffie-Hellman authorization key exchange (was previously a stub)
|
|
18
|
+
- Full MTProto encrypted message handling with proper key derivation
|
|
19
|
+
|
|
20
|
+
#### Storage Backends
|
|
21
|
+
- `RedisStorage` — high-performance Redis backend with TTL, hash operations, and counters
|
|
22
|
+
- `PostgresStorage` — production PostgreSQL backend with JSONB, indexes, and connection pooling
|
|
23
|
+
- `get_storage()` factory function for creating backends by name
|
|
24
|
+
|
|
25
|
+
#### FSM Enhancements
|
|
26
|
+
- Decorator-based state routing: `@sm.state(Form.name)`
|
|
27
|
+
- `on_enter` / `on_leave` hooks for state transitions
|
|
28
|
+
- Fallback handler for unmatched states
|
|
29
|
+
- `FSMContext.get()` / `FSMContext.set()` for single key access
|
|
30
|
+
- `FSMContext.finish()` alias for reset
|
|
31
|
+
- `StateTransition` class for conditional transitions
|
|
32
|
+
|
|
33
|
+
#### Rate Limiting
|
|
34
|
+
- `RateLimiter` with token bucket algorithm
|
|
35
|
+
- `RateLimitMiddleware` for automatic flood wait handling
|
|
36
|
+
- `FloodWait` and `FloodWaitError` exception types
|
|
37
|
+
- Per-method rate limiting with configurable thresholds
|
|
38
|
+
|
|
39
|
+
#### File Transfer
|
|
40
|
+
- `ProgressTracker` and `TransferProgress` for upload/download progress
|
|
41
|
+
- `stream_upload()` and `stream_download()` with chunked transfer
|
|
42
|
+
- `parallel_download()` for concurrent media downloads
|
|
43
|
+
- `format_size()` utility for human-readable file sizes
|
|
44
|
+
|
|
45
|
+
#### Event System
|
|
46
|
+
- `HandlerPriority` enum (FIRST, HIGH, NORMAL, LOW, LAST)
|
|
47
|
+
- Handler priority ordering — lower values run first
|
|
48
|
+
- `Event.stop_propagation()` to prevent subsequent handlers from running
|
|
49
|
+
- `ErrorEvent` for handler error reporting
|
|
50
|
+
- `@bot.on_error()` decorator for global error handling
|
|
51
|
+
- `ErrorHandlerBuilder` for filtering errors by exception type
|
|
52
|
+
|
|
53
|
+
#### Performance
|
|
54
|
+
- `LRUCache` with hit/miss statistics and TTL support
|
|
55
|
+
- `EntityCache` for auto-caching users/chats with deduplication
|
|
56
|
+
- `batch_send()`, `batch_delete()`, `batch_forward()`, `batch_get_messages()`
|
|
57
|
+
- `batch_operation()` generic batch executor
|
|
58
|
+
|
|
59
|
+
#### Packaging & CLI
|
|
60
|
+
- CLI entry point: `spluspy run bot.py`, `spluspy session-info`, `spluspy version`, `spluspy validate`
|
|
61
|
+
- Dockerfile for containerized bot deployment
|
|
62
|
+
- Optional dependencies: `pip install spluspy[redis]`, `pip install spluspy[postgres]`
|
|
63
|
+
|
|
64
|
+
#### Testing
|
|
65
|
+
- Tests for storage backends
|
|
66
|
+
- Tests for enhanced FSM
|
|
67
|
+
- Tests for rate limiter
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
- `SoroushAPI` no longer has hardcoded `api_id`/`api_hash` — credentials must come from user
|
|
71
|
+
- `TelegramConfig.apply_defaults()` now raises `ValueError` if credentials are missing
|
|
72
|
+
- `EventBuilder` accepts `priority` parameter
|
|
73
|
+
- `Client.on_message()` accepts `priority` kwarg
|
|
74
|
+
- Updated `pyproject.toml` with new optional dependencies and CLI entry point
|
|
75
|
+
|
|
76
|
+
### Fixed
|
|
77
|
+
- AES-ECB fallback was insecure and broke IGE mode
|
|
78
|
+
- Auth key exchange was a stub that never performed real DH exchange
|
|
79
|
+
- `_process_message` now properly parses encrypted MTProto containers
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## [2.0.0] - 2024-01-01
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
|
|
87
|
+
- Complete rewrite from scratch with clean architecture
|
|
88
|
+
- Async-first design with full type hints
|
|
89
|
+
- Synchronous client wrapper (`spluspy.sync`)
|
|
90
|
+
- Composable filter system (`filters.text & filters.private`)
|
|
91
|
+
- FSM (Finite State Machine) for conversational bots
|
|
92
|
+
- Plugin system with dynamic loading
|
|
93
|
+
- Middleware system for pre/post processing
|
|
94
|
+
- Task scheduler
|
|
95
|
+
- Multiple storage backends (Memory, SQLite)
|
|
96
|
+
- Professional logging system
|
|
97
|
+
- Connection pool with auto-reconnect
|
|
98
|
+
- LRU cache
|
|
99
|
+
- 100+ examples
|
|
100
|
+
- Full test suite with pytest
|
|
101
|
+
- CI/CD with GitHub Actions
|
|
102
|
+
|
|
103
|
+
### Changed
|
|
104
|
+
|
|
105
|
+
- Complete API redesign inspired by Telethon/Pyrogram
|
|
106
|
+
- Message objects now have methods (reply, edit, delete, etc.)
|
|
107
|
+
- Event system uses builder pattern
|
|
108
|
+
- Session system supports SQLite, Memory, and String sessions
|
|
109
|
+
- Exception hierarchy with specific error types
|
|
110
|
+
|
|
111
|
+
### Removed
|
|
112
|
+
|
|
113
|
+
- Legacy Telethon-forked code
|
|
114
|
+
- Monolithic architecture
|
|
115
|
+
- Untyped code
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## [1.0.1] - 2023-12-01
|
|
120
|
+
|
|
121
|
+
### Fixed
|
|
122
|
+
|
|
123
|
+
- Minor bug fixes
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## [1.0.0] - 2023-11-01
|
|
128
|
+
|
|
129
|
+
### Added
|
|
130
|
+
|
|
131
|
+
- Initial release as a Telethon fork
|
|
132
|
+
- Basic Soroush Plus support
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Contributing to SplusPy
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to SplusPy! This document provides guidelines and information for contributors.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
1. Fork the repository on GitHub
|
|
8
|
+
2. Clone your fork locally:
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/your-username/spluspy.git
|
|
11
|
+
cd spluspy
|
|
12
|
+
```
|
|
13
|
+
3. Create a virtual environment:
|
|
14
|
+
```bash
|
|
15
|
+
python -m venv venv
|
|
16
|
+
source venv/bin/activate # Linux/Mac
|
|
17
|
+
# or
|
|
18
|
+
venv\Scripts\activate # Windows
|
|
19
|
+
```
|
|
20
|
+
4. Install development dependencies:
|
|
21
|
+
```bash
|
|
22
|
+
pip install -e ".[dev]"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Development Workflow
|
|
26
|
+
|
|
27
|
+
1. Create a feature branch:
|
|
28
|
+
```bash
|
|
29
|
+
git checkout -b feature/your-feature-name
|
|
30
|
+
```
|
|
31
|
+
2. Make your changes
|
|
32
|
+
3. Run the linter:
|
|
33
|
+
```bash
|
|
34
|
+
ruff check spluspy/
|
|
35
|
+
```
|
|
36
|
+
4. Run the formatter:
|
|
37
|
+
```bash
|
|
38
|
+
black spluspy/
|
|
39
|
+
```
|
|
40
|
+
5. Run type checker:
|
|
41
|
+
```bash
|
|
42
|
+
mypy spluspy/
|
|
43
|
+
```
|
|
44
|
+
6. Run tests:
|
|
45
|
+
```bash
|
|
46
|
+
pytest
|
|
47
|
+
```
|
|
48
|
+
7. Commit your changes with a clear message
|
|
49
|
+
8. Push to your fork and create a pull request
|
|
50
|
+
|
|
51
|
+
## Code Style
|
|
52
|
+
|
|
53
|
+
- Follow PEP 8
|
|
54
|
+
- Use type hints for all functions and methods
|
|
55
|
+
- Write docstrings for public APIs
|
|
56
|
+
- Keep functions focused and small
|
|
57
|
+
- Use meaningful variable and function names
|
|
58
|
+
|
|
59
|
+
## Testing
|
|
60
|
+
|
|
61
|
+
- Write tests for new features
|
|
62
|
+
- Ensure all tests pass before submitting a PR
|
|
63
|
+
- Aim for high test coverage
|
|
64
|
+
|
|
65
|
+
## Pull Request Guidelines
|
|
66
|
+
|
|
67
|
+
- Provide a clear description of the changes
|
|
68
|
+
- Reference any related issues
|
|
69
|
+
- Include tests for new functionality
|
|
70
|
+
- Update documentation if needed
|
|
71
|
+
|
|
72
|
+
## Reporting Issues
|
|
73
|
+
|
|
74
|
+
- Use the GitHub issue tracker
|
|
75
|
+
- Include steps to reproduce the issue
|
|
76
|
+
- Include your Python version and OS
|
|
77
|
+
- Include error messages and stack traces
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
spluspy-2.0.3/Dockerfile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
FROM python:3.12-slim
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
# Install system dependencies
|
|
6
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
7
|
+
gcc \
|
|
8
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
9
|
+
|
|
10
|
+
# Copy requirements first for Docker layer caching
|
|
11
|
+
COPY pyproject.toml README.md ./
|
|
12
|
+
COPY spluspy/ spluspy/
|
|
13
|
+
|
|
14
|
+
# Install the package
|
|
15
|
+
RUN pip install --no-cache-dir ".[all]"
|
|
16
|
+
|
|
17
|
+
# Copy bot script if present
|
|
18
|
+
COPY bot.py ./
|
|
19
|
+
|
|
20
|
+
# Run the bot
|
|
21
|
+
CMD ["python", "bot.py"]
|
spluspy-2.0.3/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ali Mirshekari
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|