All Projects → lugodev → qvapay-python

lugodev / qvapay-python

Licence: MIT license
Non official, but friendly QvaPay library for the Python language.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to qvapay-python

go-json-spec-handler
Simple JSON API Spec Compatibility in Golang
Stars: ✭ 41 (+127.78%)
Mutual labels:  api-client
rdfp
This R package connects the DoubleClick for Publishers API from R
Stars: ✭ 16 (-11.11%)
Mutual labels:  api-client
yelp-ios
No description or website provided.
Stars: ✭ 61 (+238.89%)
Mutual labels:  api-client
crates io api
API client for crates.io, the Rust crate registry.
Stars: ✭ 51 (+183.33%)
Mutual labels:  api-client
binance-client-websocket
🛠️ C# client for Binance websocket API
Stars: ✭ 41 (+127.78%)
Mutual labels:  api-client
golio
League of Legends API client written in Golang
Stars: ✭ 45 (+150%)
Mutual labels:  api-client
cv4pve-api-php
Proxmox VE Client API for PHP
Stars: ✭ 45 (+150%)
Mutual labels:  api-client
strava
PHP Class for the Strava API (v3)
Stars: ✭ 117 (+550%)
Mutual labels:  api-client
drowsy
😪 Lazy integrations tool for RESTful interfaces to aid POC development and streamline integrations
Stars: ✭ 19 (+5.56%)
Mutual labels:  api-client
WikidataR
An R package for the Wikidata API
Stars: ✭ 49 (+172.22%)
Mutual labels:  api-client
insomnia-workspace
An Insomnia Workspace for Alpaca API
Stars: ✭ 34 (+88.89%)
Mutual labels:  api-client
rippled-php
A PHP library for rippled (XRP Ledger) communication.
Stars: ✭ 33 (+83.33%)
Mutual labels:  api-client
noire-server
Hapi Boilerplate
Stars: ✭ 20 (+11.11%)
Mutual labels:  api-client
bionode-ncbi
Node.js module for working with the NCBI API (aka e-utils).
Stars: ✭ 66 (+266.67%)
Mutual labels:  api-client
php-abraflexi
PHP Based Library for easy interaction with czech accounting system FlexiBee.
Stars: ✭ 15 (-16.67%)
Mutual labels:  api-client
pygoodwe
Python library for querying Goodwe API
Stars: ✭ 20 (+11.11%)
Mutual labels:  api-client
YuiAPI
一个浏览器API测试客户端,API文档生成器,支持chrome/firefox/新版edge
Stars: ✭ 25 (+38.89%)
Mutual labels:  api-client
DummyJSON
DummyJSON provides different types of REST Endpoints filled with JSON data which you can use in developing the frontend with your favorite framework and library without worrying about writing a backend.
Stars: ✭ 213 (+1083.33%)
Mutual labels:  api-client
pinboard.net
Fully featured API wrapper for pinboard.in
Stars: ✭ 21 (+16.67%)
Mutual labels:  api-client
sia-cog
Various cognitive api for machine learning, vision, language intent alalysis. Covers traditional as well as deep learning model design and training.
Stars: ✭ 34 (+88.89%)
Mutual labels:  api-client

Python SDK for the QvaPay API

Banner

Non official, but friendly QvaPay library for the Python language.

License: MIT Test codecov Version Last commit GitHub commit activity Github Stars Github Forks Github Watchers GitHub contributors All Contributors

Setup

You can install this package by using the pip tool and installing:

pip install qvapay

Or

easy_install qvapay

Sign up on QvaPay

Create your account to process payments through QvaPay at qvapay.com/register.

Using the client

First, import the AsyncQvaPayClient (or SyncQvaPayClient) class and create your QvaPay asynchronous (or synchronous) client using your app credentials.

from qvapay.v1 import AsyncQvaPayClient

client = AsyncQvaPayClient(app_id, app_secret)

It is also possible to use the QvaPayAuth class (which by default obtains its properties from environment variables or from the content of the .env file) and the static method AsyncQvaPayClient.from_auth (or SyncQvaPayClient.from_auth) to initialize the client.

from qvapay.v1 import AsyncQvaPayClient, QvaPayAuth

client = AsyncQvaPayClient.from_auth(QvaPayAuth())

Use context manager

The recommended way to use a client is as a context manager. For example:

async with AsyncQvaPayClient(...) as client:
    # Do anything you want
    ...

or

with SyncQvaPayClient(...) as client:
    # Do anything you want
    ...

Get your app info

# Use await when using AsyncQvaPayClient
# With SyncQvaPayClient it is not necessary.
info = await client.get_info()

Get your account balance

# Use await when using AsyncQvaPayClient
# With SyncQvaPayClient it is not necessary.
balance = await client.get_balance()

Create an invoice

# Use await when using AsyncQvaPayClient
# With SyncQvaPayClient it is not necessary.
transaction = await client.create_invoice(
    amount=10,
    description='Ebook',
    remote_id='EE-BOOk-123' # example remote invoice id
)

Get transaction

# Use await when using AsyncQvaPayClient
# With SyncQvaPayClient it is not necessary.
transaction = await client.get_transaction(id)

Get transactions

# Use await when using AsyncQvaPayClient
# With SyncQvaPayClient it is not necessary.
transactions = await client.get_transactions(page=1)

You can also read the QvaPay API documentation: qvapay.com/docs.

For developers

The _sync folders were generated automatically executing the command unasync qvapay tests.

The code that is added in the _async folders is automatically transformed.

So every time to make a change you must run the command unasync qvapay tests to regenerate the folders _sync with the synchronous version of the implementation.

Improve tests implementation and add pre-commit system to ensure format and style.

Migration guide

0.2.0 -> 0.3.0

  • QvaPayClient was divided into two classes: AsyncQvaPayClient and SyncQvaPayClient. Both classes have the same methods and properties, with the difference that the methods in AsyncQvaPayClient are asynchronous and in SyncQvaPayClient are synchronous.

0.1.0 -> 0.2.0

  • user_id of Transaction model was removed
  • paid_by_user_id of Transaction model was removed

0.0.3 -> 0.1.0

  • from qvapay.v1 import * instead of from qvapay import *
  • QvaPayClient instead of Client
  • client.get_info instead of client.info
  • client.get_balance instead of client.balance
  • client.get_transactions instead of client.transactions

Contributors

Thanks goes to these wonderful people (emoji key):


Carlos Lugones

💻

Ozkar L. Garcell

💻

Leynier Gutiérrez González

💻

Jorge Alejandro Jimenez Luna

💻

Reinier Hernández

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].