YooKassa API Python Client Library
Russian | English
This product is used for managing payments under The YooKassa API For usage by those who implemented YooKassa using the API method.
Features
- Version 3.x supports Python >=3.7. To work on earlier versions of Python, use versions of yookassa 2.x
- Changing the directory/file structure affected some package imports. When switching from the version of yookassa 2.x, check the imports in your project:
yookassa.domain.models.airline→yookassa.domain.models.payment_data.request.airlineyookassa.domain.models.authorization_details→yookassa.domain.models.payment_data.response.authorization_detailsyookassa.domain.models.receipt_customer→yookassa.domain.models.receipt_data.receipt_customeryookassa.domain.models.receipt_item→yookassa.domain.models.receipt_data.receipt_itemyookassa.domain.models.receipt_item_supplier→yookassa.domain.models.receipt_data.receipt_item_supplieryookassa.domain.models.recipient→yookassa.domain.models.payment_data.recipientyookassa.domain.models.refund_source→yookassa.domain.models.refund_data.refund_source
Settings.get_account_settings()now returns theMeobject. To support compatibility, object fields can be accessed as an array -me.account_id = me['account_id']- The
me.fiscalization_enabledfield is deprecated, but it is still supported. Theme.fiscalizationobject has been added instead..
Requirements
- Python >=3.7
- pip
Installation
Under console using pip
- Install pip.
- In the console, run the following command:
pip install --upgrade yookassa
Under console using easy_install
- Install easy_install.
- In the console, run the following command:
easy_install --upgrade yookassa
Commencing work
- Import module
import yookassa
- Configure a Client
from yookassa import Configuration
Configuration.configure('<Account Id>', '<Secret Key>')
or
from yookassa import Configuration
Configuration.account_id = '<Account Id>'
Configuration.secret_key = '<Secret Key>'
or via oauth
from yookassa import Configuration
Configuration.configure_auth_token('<Oauth Token>')
If you agree to participate in the development of the SDK, you can submit data about your framework, cms or module:
from yookassa import Configuration
from yookassa.domain.common.user_agent import Version
Configuration.configure('<Account Id>', '<Secret Key>')
Configuration.configure_user_agent(
framework=Version('Django', '2.2.3'),
cms=Version('Wagtail', '2.6.2'),
module=Version('Y.CMS', '0.0.1')
)
- Call the required API method. More details in our documentation for the YooKassa API
Metadata
Release files for yookassa-timeouts 3.10.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yookassa_timeouts-3.10.2.tar.gz | 141.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yookassa_timeouts-3.10.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 426.9 kB
Release files / yookassa_timeouts-3.10.2.tar.gz
| Download URL | yookassa_timeouts-3.10.2.tar.gz |
|---|---|
| Size | 141.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6647fde035e7e9319124b269bed85bfa1e1ed2d96dd1b20ed939c5611cd9bb5e
|
|
BLAKE2b-256 checksum How to use checksums |
0ff3d9c0fea48e3f7c6781fc3602a6f9463ae1234777f9f1bd6b16e1ed3af43e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / yookassa_timeouts-3.10.2-py2.py3-none-any.whl
| Download URL | yookassa_timeouts-3.10.2-py2.py3-none-any.whl |
|---|---|
| Size | 285.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c2886bbb723608bea749dbd2265c36aea22691ab8372baa74e963b680cf2cbcc
|
|
BLAKE2b-256 checksum How to use checksums |
4bc6a981c4af3e99e8c7a911c82bb7eec31a2713f81fa1ee99c6d1823106dcd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|