Skip to main content

YooKassa ASync API Python Client Library

Build Status Latest Stable Version Total Downloads License

Russian | English

Клиент для работы с платежами по API ЮKassa Подходит тем, у кого способ подключения к ЮKassa называется API.

Асинхронная версия.

Требования

  1. Python >=3.7
  2. pip

Установка

C помощью pip

  1. Установите pip.
  2. В консоли выполните команду
pip install --upgrade yookassa

С помощью easy_install

  1. Установите easy_install.
  2. В консоли выполните команду
easy_install --upgrade yookassa

Вручную

  1. В консоли выполните команды:
wget https://pypi.python.org/packages/5a/be/5eafdfb14aa6f32107e9feb6514ca1ad3fe56f8e5ee59d20693b32f7e79f/yookassa-1.0.0.tar.gz#md5=46595279b5578fd82a199bfd4cd51db2
tar zxf yookassa-1.0.0.tar.gz
cd yookassa-1.0.0
python setup.py install

Начало работы

  1. Импортируйте модуль
import yookassa
  1. Установите данные для конфигурации
from yookassa import Configuration

Configuration.configure('<Идентификатор магазина>', '<Секретный ключ>')

или

from yookassa import Configuration

Configuration.account_id = '<Идентификатор магазина>'
Configuration.secret_key = '<Секретный ключ>'

или через oauth

from yookassa import Configuration

Configuration.configure_auth_token('<Oauth Token>')

Если вы согласны участвовать в развитии SDK, вы можете передать данные о вашем фреймворке, cms или модуле:

from yookassa import Configuration
from yookassa.domain.common.user_agent import Version

Configuration.configure('<Идентификатор магазина>', '<Секретный ключ>')
Configuration.configure_user_agent(
    framework=Version('Django', '2.2.3'),
    cms=Version('Wagtail', '2.6.2'),
    module=Version('Y.CMS', '0.0.1')
)
  1. Вызовите нужный метод API. Подробнее в документации к API ЮKassa

Примеры использования SDK

Настройки SDK API ЮKassa

Работа с платежами

Работа с возвратами

Работа с чеками

Metadata

Release files for yookassa-async 0.1.5

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

Source distribution (sdist)

Source distribution for yookassa-async 0.1.5
File Size Uploaded Provenance Actions
yookassa_async-0.1.5.tar.gz 37.9 kB Without provenance Details for yookassa_async-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yookassa-async 0.1.5
File Interpreter ABI Platform Actions
yookassa_async-0.1.5-py3-none-any.whl Python 3 none any Details for yookassa_async-0.1.5-py3-none-any.whl

Total release size: 131.5 kB

Release files / yookassa_async-0.1.5.tar.gz

Download URL yookassa_async-0.1.5.tar.gz
Size 37.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9fd610bde3f94d0f030f62419cac24df68fbb8cd6449199843a1b7ce25192c78
BLAKE2b-256 checksum
How to use checksums
d48b707012635138211e0c2711f3ff45746e5c371b4ae9fd639918b7159685a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.0 Windows/10

Release files / yookassa_async-0.1.5-py3-none-any.whl

Download URL yookassa_async-0.1.5-py3-none-any.whl
Size 93.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85c2f0272a03dcf1887e08fb900fc39e1e47455221efd59046aae73a5a2a4348
BLAKE2b-256 checksum
How to use checksums
3145213a5eb526161e1d5197ff042c3337e89fb306e21ebaabb3933a731ada84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.9.0 Windows/10

Security for yookassa-async 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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