Giter Club home page Giter Club logo

glqiwiapi's Introduction

PyPI version Downloads docs Language grade: Python CodeFactor codecov CI mypy Downloads Downloads

🌎Official API resources:

  • 🎓 Documentation: here
  • 🖱️ Telegram chat: Dev-Telegram

Benchmarks

hint: smaller is better
glQiwiApi      90.9925 (1.0)      103.3993 (1.0)       95.4082 (1.0)      5.3941 (1.0)       92.4023 (1.0)       8.2798 (1.0)
pyQiwiP2P     112.2819 (1.23)     135.0227 (1.31)     123.7498 (1.30)     9.9919 (1.85)     127.5926 (1.38)     17.2723 (2.09)

🐦Dependencies

Library Description
aiohttp Asynchronous HTTP Client/Server for asyncio and Python.
pydantic Json data validator. Very fast instead of custom

glqiwiapi's People

Contributors

dependabot[bot] avatar glef1x avatar imgbotapp avatar lgtm-migrator avatar marple-git avatar pre-commit-ci[bot] avatar username391 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

glqiwiapi's Issues

Wrong Token

Здравствуйте, хочу создать p2p ссылку, но ошибка что токен не правильный, хотя на php модуле qiwi все работает и токен правильный.

glQiwiApi.qiwi.exceptions.QiwiAPIError: Wrong API token or token expired
* 401 HTTP status code
* raw response

Код взял из примера:

async def create_p2p_bill():
    async with QiwiP2PClient(secret_p2p=TOKEN) as p2p:
        bill = await p2p.create_p2p_bill(amount=1)
        print(bill)


asyncio.run(create_p2p_bill())

Windows 10, python 3.10

Request method 'GET' not supported

При попытке совершить платеж через yoomoney все падает. Сервер возвращает ошибку "Request method 'GET' not supported" (во время второго запроса.
Нужно заменить http_method: ClassVar[str] = "GET" на "POST" в glQiwiApi/yoo_money/methods/process_payment.py чтобы все работало

Changes in API since 0.2.15 version

💘Changes since version 0.2.15:

  • Webhooks and handlers were added.
  • The documentation was rewritten from scratch.
  • Unit tests were written for the QIWI API.
  • QIWI Maps API coverage was added.
  • Query caching is still in beta testing now, but it will be released as stable from the 0.2.3 version of glQiwiApi.
  • Added sync "connector" function to run any async functions in synchronous code

⛏TODO:

  • poetry coverage

Referer (QIWI block)

Hi. As I know (from June) QIWI block wallets users of which go to p2p pages from messengers, email and other services. QIWI needs referer. Is everything ok if I use glQiwiApi?

UPD: info from here

Yoomoney API should support "OAuth2 client_secret"

In Yoomoney service creation interface you can choose "Verify app authenticity (OAuth2 client_secret)", it's not really a big deal to generate the right link by myself, but I think it should be "with batteries"

Error code 400 create p2p wallet

Traceback:

   return await wallet.create_p2p_bill(amount=amount)
                 │      │                      └ 99
                 │      └ <function QiwiWrapper.create_p2p_bill at 0x7fd28d19c700>
                 └ <glQiwiApi.qiwi.client.QiwiWrapper object at 0x7fd28192e9e0>

  File "/home/attack3r/workspace/aiogram_shop_dev/venv/lib/python3.9/site-packages/glQiwiApi/qiwi/client.py", line 1463, in create_p2p_bill
    async for response in self._requests.fast().fetch(
                          │    └ <member '_requests' of 'QiwiWrapper' objects>
                          └ <glQiwiApi.qiwi.client.QiwiWrapper object at 0x7fd28192e9e0>
  File "/home/attack3r/workspace/aiogram_shop_dev/venv/lib/python3.9/site-packages/glQiwiApi/core/basic_requests_api.py", line 231, in fetch
    yield await future
                └ <coroutine object as_completed.<locals>._wait_for_one at 0x7fd28dcc94c0>
  File "/usr/lib/python3.9/asyncio/tasks.py", line 614, in _wait_for_one
    return f.result()  # May raise f.exception().
           │ └ <method 'result' of '_asyncio.Task' objects>
           └ <Task finished name='Task-12638' coro=<RequestManager._make_request() done, defined at /home/attack3r/workspace/aiogram_shop_...
  File "/home/attack3r/workspace/aiogram_shop_dev/venv/lib/python3.9/site-packages/glQiwiApi/core/aiohttp_custom_api.py", line 86, in _make_request
    raise self.make_exception(
          │    └ <function HttpXParser.make_exception at 0x7fd28d1d2550>
          └ <glQiwiApi.core.aiohttp_custom_api.RequestManager object at 0x7fd28192e200>

glQiwiApi.utils.exceptions.RequestError: code=400 doc=Недостаточно средств для проведения операции, additional_info=1.0.2 version api
2021-08-01 15:14:21.942 | INFO     | aiohttp.web_log:log:206 - 127.0.0.1 [01/Aug/2021:12:14:21 +0000] "POST /bot HTTP/1.0" 200 158 "-" "-"
Спустя некоторое время начинает падать с такой ошибкой при создании p2p кошелька.

Версия: 
`glqiwiapi                      1.0.2`

Bug related to converting dates to ISO format

Thanks to @github-localhost I has found a significant enough bug.
This function is deprecated and leads to incorrect work -> https://github.com/GLEF1X/glQiwiApi/blob/dev-1.x/glQiwiApi/utils/api_helper.py#L100
Also, investigating this bug, mark that QiwiWrapper.create_p2p_bill(...), QiwiWrapper.transactions(...) can work bad on some systems(particularly on Docker machine).
At the moment, the solution to this problem is at development branch.
In next release(1.0.4) it will be completely fixed.

Empty access_token

  1. Try to authorize your app
  2. After all steps done get empty string from YooMoneyAPI.get_access_token method

Code for repro

import asyncio

from glQiwiApi import YooMoneyAPI


async def get_url_to_auth() -> None:
    client_id = input("CLIENT ID: ")
    redirect_url = input("REDIRECT URL: ")

    print(
        await YooMoneyAPI.build_url_for_auth(
            scopes=["account-info", "operation-history"],
            client_id=client_id,
            redirect_uri=redirect_url,
        )
    )

    access_token = await YooMoneyAPI.get_access_token(
        code=input("CODE: "),
        client_id=client_id,
        redirect_uri=redirect_url,
    )

    print("ACCESS_TOKEN:", access_token)


asyncio.run(get_url_to_auth())

System info:
Windows 10, Python 3.10

Time conversion(Ukraine)

Due to time conversion in Ukraine utility function datetime_to_iso8601 is working incorrect. Hot fix will be published today.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.