Skip to main content

Asynchronous AnyPay API wrapper

Project description

Search4FacesAPI

PyPI PyPI

A simple, yet powerful library for AnyPay API

Usage

With AnyPayAPI you can easily create and retrieve payment and payout info, get informaition about your account's balance and commissions, etc.

Documentation

Official docs can be found on the API's webpage

Installation

pip install anypay

Requirements

  • Python 3.9+
  • httpx
  • pydantic

Features

  • Asynchronous
  • Exception handling
  • Pydantic return model
  • LightWeight

Basic example

import asyncio

from anypay import AnyPayAPI, AnyPayAPIError


api = AnyPayAPI(
    'api_id', 'api_key', no_check=True # you can disable credentials check
) 


async def main():

    try:

        await api.get_balance()

    except AnyPayAPIError as exc:

        print(exc)

    payments = await api.get_payments(project_id=1) # project_id can be provided in __init__
    print(payments[0].id, payments[0].status)

    bill = await api.create_payment(
        pay_id=1234,
        project_id=1,
        method='qiwi',
        email='test@mail.ru',
        amount=100, 
        currency='RUB', 
        description='Test payment', 
    )
    print(bill.id, bill.url)


asyncio.run(main())

Developed by Nikita Minaev (c) 2023

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

anypay-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

anypay-1.0.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file anypay-1.0.0.tar.gz.

File metadata

  • Download URL: anypay-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for anypay-1.0.0.tar.gz
Algorithm Hash digest
SHA256 32902b35626d477ed21d0858dd6cd3b3b10c796265d03cf09ca9c7ace9644336
MD5 0f2d2202030c7343ddcffdcdb30e3b0f
BLAKE2b-256 1d2d584949efc912116e156b9cd7d12b1935dd8f6bfcdfa6a34eca56acb029c3

See more details on using hashes here.

File details

Details for the file anypay-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: anypay-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for anypay-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f3cc3105c26cbc60c20d81755c53182a448a4ab340101f02110a1ad18fbebaa
MD5 37d59c0f34bb80c6db2bbf7dcfd3d548
BLAKE2b-256 faad09193f0107e995db7514f7d86b93e579467342c9008615176f16941df5c4

See more details on using hashes here.

Supported by

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