Beta release 1.0.3b2
Major changes in the library:
- Fixed bug with poling (earlier update could come 2+ times to the handler)
- Added custom filters similar to
BoundFilter
, but slightly stripped down - The source has become much cleaner, but backward compatibility was not being broken
- Added CI integration based on
github actions
, in accordance with this added support forcodecov
(so far only 80/100%) - Fixed stub files for utilities, namely
api_helper.pyi
- Added 2 glQiwiApi / ext extensions (module ssl_configurator (generation of self-written ssl) and url_builder (simple interface for creating paths for webhooks based on one object))
- The dispatcher now asynchronously processes handlers when pulling and webhooks (it was sequentially without gather)
- Well, from the old versions, small bug fixes
TelegramPollingProxy
andTelegramWebhookProxy
(for polling updates along with aiogram)
Example of use generic filters:
from glQiwiApi import BaseFilter, QiwiWrapper, types
from glQiwiApi.utils import executor
# let's imagine that payload its a dictionary with your tokens =)
wallet = QiwiWrapper(**payload)
class MyFirstFilter(BaseFilter):
async def check(self, update: types.Transaction) -> bool:
return True
class MySecondFilter(BaseFilter):
async def check(self, update: types.Transaction) -> bool:
return False
@wallet.transaction_handler(MyFirstFilter(), lambda event: event is not None, ~MySecondFilter())
async def my_handler(event: types.Transaction):
...
executor.start_polling(wallet)