Skip to main content

Библиотека для взаимодействия с API yookassa.ru. Имеется как синхронный, так и асинхронный варинт использования.

Project description

YooKassa API Library

YooKassa API Library is a Python package designed to simplify interaction with YooKassa's API. This library provides a convenient way to handle payments, refunds, and various operations by utilizing the comprehensive methods available in the YooKassa API.

Also there is both a synchronous and asynchronous variation

Features

  • Easy-to-use interface for YooKassa API.
  • Supports payment creation, capture, and cancellation.

Installation

To install the library, use pip:

pip install yookassa_api

Or you can install it by Poetry:

poetry add yookassa_api

Getting Started

Here is a simple example to demonstrate how to use the library:

from yookassa_api import (
    YooKassa, PaymentAmount,
    Confirmation
)
from yookassa_api.types import CurrencyType 


# Initialize the YooKassa client
client = YooKassa(
    'SECRET_KEY',
    shop_id=999999
)

# Create a payment
payment = client.create_payment(
    PaymentAmount(value=100, currency=CurrencyType.RUB),
    description='Test payment',
    confirmation=Confirmation(                                      
        type=ConfirmationType.REDIRECT,
        return_url="https://t.me/BotFather",                  
    )
)
print(payment)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yookassa_api-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yookassa_api-0.1.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file yookassa_api-0.1.0.tar.gz.

File metadata

  • Download URL: yookassa_api-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-51-generic

File hashes

Hashes for yookassa_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b501ea809be93a7531a1a49fbf06f00ac674a458987dac20e008265329358355
MD5 e952cfeb1a603c4620e815ef19b3fb11
BLAKE2b-256 8b755160fce9cf326003f3c7ff9bcc02673ef30b05c3a9f444e3aac20186b8a2

See more details on using hashes here.

File details

Details for the file yookassa_api-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: yookassa_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-51-generic

File hashes

Hashes for yookassa_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a684fe83aa9ec64dac0c4cf71aabc888220b49ff4e7254e226ac637a2db2eed
MD5 6301079b6cd890982d37bcd7fdc6ced3
BLAKE2b-256 8ff92a553636daaa6a716ce527d6e557bb313e358289debc5d5faef22c5e066f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page