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
  • Why should you choose exactly glQiwiApi and not other libraries?

    1. It’s working faster than other async wrappers for qiwi and yoomoney 💥

    2. Evidently, It’s asynchronous

    3. Supports most of qiwi apis: qiwi-maps, bills, wallet and, also, yoomoney

    4. Provides support of polling and webhooks for QIWI as well as possible

    5. Furnish many utils and extensions such a currency parser, pydantic support and code coverage not less than 80% “out of the box”

    6. Full compatibility with mypy

Quick start

import asyncio

from glQiwiApi import QiwiWrapper, APIError


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 QiwiWrapper(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 APIError 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"))

Content