Skip to main content

IOKA Asynchronous Python Client Library

Python Package Index

Клиент для платежного сервиса IOKA. Позволяет обращаться к API IOKA из кода на Python.

Установка

pip install ioka

Требования

Python 3.7+

Использование

from ioka import IOKA
ioka_client = IOKA('IOKA_SECRET_KEY', 'IOKA_HOST')
  • При создании клиента задаются параметры: Secret Key и IOKA Host:

    SECRET_KEY: для аутентификации.

    IOKA_HOST: для выбора среды (тестовый Host & боевой Host).

Обращение к API осуществляется через методы клиента.

Регистрация платежа (описание)
from ioka.schemas import RegisterPaymentRequest

data = {
    "amount": 3000,
    "currency": 398,
    "order_id": 322,
    "client_id": 1247,
    "tr_type": 0,
    "email": "client.1247@gmail.com",
    "phone": "+7**********",
    "back_url": f"https://mywebsite.com/back/",
    "callback_url": "https://mywebsite.com/callback/"
}

payment = RegisterPaymentRequest(**data)
ioka_response = await ioka_client.register_payment(payment)

В случае успеха возвращает строку типа URL.

TODO:

  • Validations

  • Error response

  • Async to sync

  • Signature verification method

  • Implement rest-aiohttp in more smart way

  • Update README, add another methods

  • Document methods

Metadata

Release files for ioka 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ioka 1.1.3
File Size Uploaded
ioka-1.1.3.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ioka 1.1.3
File Interpreter ABI Platform
ioka-1.1.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 10.1 kB

Release files / ioka-1.1.3.tar.gz

Download URL ioka-1.1.3.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
045b34e7989a46ee73a15df7a109e5146eee8850ee86f4949c71dcbe72f36fbd
BLAKE2b-256 checksum
How to use checksums
aeed96e488304d66cf7c27d3ad0dd339a9da198e64287c7eaa5c35511d9a217b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9

Release files / ioka-1.1.3-py2.py3-none-any.whl

Download URL ioka-1.1.3-py2.py3-none-any.whl
Size 6.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4932feb97159a1be49dd6e8cced947653cf0f9ba6d80020eeca99b99fd3261de
BLAKE2b-256 checksum
How to use checksums
ea71e72a9cb0a94039d11ee432368bf5ee392e282d053d99aaa9a0287a5ec0b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.1.3 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

1 release file

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page