Welcome to the glQiwiApi documentation!#

Latest version released on PyPi python version downloads per month number of downloads for all time code grade code coverage CI

Danger

glQiwiApi 2.x has breaking changes. It breaks backwards compatibility by introducing new breaking changes!

Features:#

  • It’s working faster than other async wrappers for qiwi and yoomoney see here

  • Obviously, it’s asynchronous

  • Fully supports qiwi apis: qiwi-maps, bills, wallet and also yoomoney

  • Provides support of polling and webhooks for QIWI as well as possible

  • Furnishes many utils and extensions such a pydantic support, code coverage not less than 80% and many other handy things

  • Full compatibility with static type checking(mypy)

Quick example#

import asyncio

from glQiwiApi import QiwiWallet
from glQiwiApi.qiwi.exceptions import QiwiAPIError


async def print_balance(qiwi_token: str, phone_number: str) -> None:
    """
    This function allows you to get balance of your wallet using glQiwiApi library
    """
    async with QiwiWallet(api_access_token=qiwi_token, phone_number=phone_number) as w:
        try:
            balance = await w.get_balance()
        # handle exception if wrong credentials or really API return error
        except QiwiAPIError as err:
            print(err.json())
            raise
    print(f"Your current balance is {balance.amount} {balance.currency.name}")


asyncio.run(print_balance(qiwi_token="qiwi api token", phone_number="+phone_number"))

Contents#