- The predefined values of ClientOptions are now being set up properly.
- TDLib version upgraded to 1.8.31. If you use self-built TDLib binaries, you should update them to the supported version.
- All updates handlers now are called asynchronously in background. It allows making another requests in updates handlers.
- Fixed blocking authorization flow
- Ignore extra env variables in ClientSettings
- Added proper base64 encoded serialization for Bytes type
This update may contain breaking changes in some scenarios, please read carefully and update your code accordingly
-
TDLib version upgraded to 1.8.30. If you use self-built TDLib binaries, you should update them to the supported version.
-
Now library supports only Pydantic v2. If you use Pydantic v1, you should upgrade it to v2. You can follow migration guide here
-
The client now accepts a single parameter of type ClientSettings. This parameter is optional. If it is omitted, default settings will be used, with parameters filled from environment variables. Look for README.md for more information.
-
ClientProxyType
is moved toaiotdlib.client_settings
module -
ClientParseMode
is moved toaiotdlib.client_settings
module -
ClientProxySettings
is moved toaiotdlib.client_settings
module -
ClientOptions
is moved toaiotdlib.client_settings
module -
ClientSettings
is moved toaiotdlib.client_settings
module -
Some of the fields in API types and functions now have default values (ESPECIALLY BOOLEANS). Make sure it won't break your code and update it accordingly. Feel free to open any pull request to fix this problem in types generator.
- Now you can create multiple Client instances in a single process using the same TD instance. Thanks to @truenicoco for helping us move in this direction!
- Now client logger follows default log level and can be changed directly with
logging.getLogger(...)
. Client logger name now follows pattern "Client_{client_id}"
-
The client settings have been updated to set default properties such as 'enable_storage_optimizer' and ' ignore_file_names'. The handling of setting options has been improved to support setting options with None values. Event registration in the client cache has been refactored to provide clearer semantics and easier removal of event handlers. Logging and handling of updates have also been refined to catch and handle exceptions more effectively.
-
Minor fixes and improvements
In this release added a check of Pydantic version. If you have Pydantic v2 and higher NotImplementedError
will be
raised.
This version of library will be the last one with Pydantic v1 support.
No information about this release
-
Improved generator: Now some fields have default values. Detected nullable values now are null by default.
-
Resolved circular imports error in types. Refactored types module. All types now are stored into single file. (Fixed #57)
-
TDLib binaries upgraded to available version (1.8.14) (for 24.06.2023)
-
All integer model fields now have
le
constraints as they mentioned in tdlib (Int32
,Int53
,Int64
) -
All types and functions regenerated
-
Upgraded all deps
-
Another minor fixes and improvements
-
Due to python limitations, some arguments changed their position in functions signature. If you pass them as positional arguments, make sure they passed in correct order now!
-
No client options are set now by default! Make sure you pass them as options parameter of
Client
-
As library wasn't updated for so long, you should check all used tdlib apis used by you before migrating to this version!
-
Refactored
aiotdlib.api
module,aiotdlib.api.BaseObject
refactored and moved toaiotdlib.api.types.base.BaseObject
- Fixed #31
- Most of
Client
class methods renamed to match python protected members convention
-
Fixed #17
-
Fixed #25 by removing wrong update handler
-
Added reactions related updates handlers in
ClientCache
-
Added missing params in methods docs
-
TDLib binaries upgraded to latest available version (1.8.4 from now)
-
API types and functions regenerated
-
Upgraded dependencies
This update may contain some breaking API changes!
-
TDLib binaries upgraded to latest available version (1.8.3 from now)
-
API types and functions regenerated
-
Prebuilt TDLib binary for linux arm64 is not more provided, but you can build them yourself and use with aiotdlib
Prebuilt binaries for other systems and platforms will not be provided as well in future aiotdlib releases
This update may contain some breaking API changes!
-
TDLib binaries upgraded to latest available version (1.8.1 from now)
-
API types and functions regenerated
This update may contain some breaking API changes!
-
TDLib binaries upgraded to latest available version (1.8.0 from now)
-
API types and functions regenerated
-
Fixed options setup (#8)
-
Removed ignore_sensitive_content_restrictions from available options as it is not editable by user
-
Fixed import typo (#9)
This update contains some breaking API changes!
-
Added ability pass TDLib options as
Client
constructor parameter -
Client.get_my_id
method to retrieve currently connected user ID
-
TDLib binaries upgraded to latest available version (1.7.11 from now)
-
API types and functions regenerated
-
Improved chats info caching
This update contains some breaking API changes!
-
TDLib binaries upgraded to latest available version (1.7.10 from now)
-
API types and functions regenerated
-
Fixed small bug with settings validation
-
Slightly reformatted Client constructor for better usability
- Fixed #6
This bug was related to this TDLib's commit
-
TDLib binaries upgraded to latest available version (1.7.9 from now)
-
API types and functions regenerated
-
TDLib binaries upgraded to latest available version
-
API types and functions regenerated
- Fixed default export
-
TDLib binaries upgraded to latest available version
-
API types and functions regenerated
Some ot types and functions have incompatible changes!
- Bring back some lost TD functions (Fix for #4)
-
Client
parameters now could be set via environment variables with AIOTDLIB_* prefix. For example: AIOTDLIB_API_ID=123456 -
Docker Secrets supported too.
Constructor parameters has higher priority than env variables and docker secrets. You can read more about this behaviour in Pydantic docs
-
TDLib binaries upgraded to latest available version (1.7.8 from now)
-
API types and functions regenerated
-
TDLib binaries upgraded to latest available version
-
API types and functions regenerated
- Added
Client.get_main_list_chats_all
helper method to get the whole main chats list
-
TDLib binaries upgraded to latest available version (1.7.7 from now)
-
Default value of
limit
parameter in methodClient.get_main_list_chats
was changed to 100 -
Default value of
limit
parameter in methodClientCache.get_main_list_chats
was changed to 100 -
Chats in
ClientCache.get_main_list_chats
are loaded using new loadChats TDLib function -
Added new
NotFound
helper exception for errors with code 400 -
Removed usage of deprecated
td_set_log_verbosity_level
function of TDJson instance. setLogVerbosityLevel is used instead -
API types and functions regenerated
This update may contain breaking changes in some scenarios
-
Slightly improved generator. Nullable parameters of some api functions now have Optional type
-
Changed file structure for prebuilt binaries
-
TDLib binaries upgraded to latest available version
-
API types and functions regenerated
- Totally removed
stop_signals
parameter ofClient.idle
method
-
stop_signals
parameter ofClient.idle
method is deprecated now and will be totally removed soon -
Fixed #2
-
TDLib binaries upgraded to latest available version
-
API types and functions regenerated
- Added
force_update: bool = False
parameter toClient
class getters. When set to True locally cached values will be refreshed from tdlib
- Fixed an error when
Client.get_supergroup
andClient.get_supergroup_full_info
returnedBasicGroup
andBasicGroupFullInfo
instead ofSupergroup
andSupergroupFullInfo
respectively
-
TDLib binaries upgraded to latest available version
-
API types and functions regenerated
- Added missing generated file from new TDLib
-
TDLib binaries upgraded to latest available version (1.7.6 from now)
-
API types and functions regenerated
- Added docker support. Fell free to use this image
-
TDLib binaries upgraded to latest available version
-
API types and functions regenerated
- Added prebuilt binary for Linux (Built with Ubuntu 20)
-
TDLib upgraded to version 1.7.5
-
API types and functions regenerated with new API available in TDLib 1.7.5
-
New high-level API method
Client.iter_chat_history
to iterate over messages in chat -
Added
Client.run
method to synchronously run client. Useful for faster bots coding (Included example in README.md)
-
Improved filters system
-
Added a few useful predefined filters
-
TDLib upgraded to version 1.7.4
-
API types and functions regenerated with new API available in TDLib 1.7.4
-
Added ujson dependency to improve performance of json encoding/decoding
-
TDJson
class now uses new TDLibJson api to work with requests
- Fixed a bug when main chats list was requested from bot session
-
timeout
parameter ofClient.request
changed torequest_timeout
-
AsyncResult
renamed toPendingRequest
-
Client.send_message
renamed toClient.send_text
- all methods of API class now have
request_timeout
parameter
-
added workaround for all aliased fields of
BaseObject
subclasses -
PendingRequest.id
is property now and returnsrequest_id
of outgoing request passed to constructor -
ClientCache
now handles telegram options updates and providesget_option_value
method to retrieve option value by name -
Messages now can be sent in semi-synchronous way:
SendMessage
request would wait forUpdateMessageSendSucceeded
event. -
Added some high-level methods to
Client
:send_photo
,send_video
,send_animation
,send_document
,send_audio
,send_voice_note
,send_video_note
,forward_messages
-
Request main chats list if session was authorized for the first time to avoid Chat not found errors and initialize inner TDLib chats cache
- Added proxy support. Proxy settings now available in Client initializer. Example
-
Minor refactoring
-
Updated TDLib binary
-
@extra
field of incoming updates now available inEXTRA
attribute ofBaseObject
and is empty dict by default. It is useful to store some user data there -
New filter factory
create_bot_command_filter(command: str)
to create specified command handler (useful for bots). This filter parses message text as command and putsbot_command
andbot_command_args
toupdate.EXTRA
-
Client.text_message_handler
method for registration of text message handlersthis method is universal and can be used directly or as decorator
-
Client.bot_command_handler
method for registration of text message handlers with texts started with "/"this method is universal and can be used directly or as decorator
-
Client.parse_text
method to parse text entities according toparse_mode
parameter. By default,parse_mode
parameter from constructor will is used -
New high-level API method
Client.edit_message
- Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side
-
Cache mechanism for chats, users and both types of groups
-
New high-level API method
Client.get_main_list_chats(limit: int)
- Returns an ordered list of chats in a main chat list. -
Multiple raw methods wrappers which work the same but returns cached entity if it was found in cache:
get_chat
,get_user
,get_user_full_info
,get_basic_group
,get_basic_group_full_info
,get_supergroup
,get_supergroup_full_info
,get_secret_chat
-
TL Schema parser now parses some parameters constraints in TL Schema such as nullability of parameter, min and max length
- API objects were regenerated with updated parser
- added
parse_mode
param toClient
class. Default parse mode for high-level methods likesend_message
. Default: " html"
Client.send_message
now automatically parses text entities in text. Text will be parsed according toparse_mode
option passed in constructor
- Removed redundant
CurrentAuthorizationState
class