Package: qvapay
Python SDK for the QvaPay APINon official, but friendly QvaPay library for the Python language.SetupYou can install this package by using the pip tool and installing:pipinstallqvapayOreasy_installqvapaySign up onQvaPayCreate your account to process payments throughQvaPayatqvapay.com/register.Using the clientFirst, import theAsyncQvaPayClient(orSyncQvaPayClient) class and create yourQvaPayasynchronous (or synchronous) client using your app credentials.fromqvapay.v1importAsyncQvaPayClientclient=AsyncQvaPayClient(app_id,app_secret)It is also possible to use theQvaPayAuthclass (which by default obtains its properties from environment variables or from the content of the.envfile) and the static methodAsyncQvaPayClient.from_auth(orSyncQvaPayClient.from_auth) to initialize the client.fromqvapay.v1importAsyncQvaPayClient,QvaPayAuthclient=AsyncQvaPayClient.from_auth(QvaPayAuth())Use context managerThe recommended way to use a client is as a context manager. For example:asyncwithAsyncQvaPayClient(...)asclient:# Do anything you want...orwithSyncQvaPayClient(...)asclient:# Do anything you want...Get your app info# Use await when using AsyncQvaPayClient# With SyncQvaPayClient it is not necessary.info=awaitclient.get_info()Get your account balance# Use await when using AsyncQvaPayClient# With SyncQvaPayClient it is not necessary.balance=awaitclient.get_balance()Create an invoice# Use await when using AsyncQvaPayClient# With SyncQvaPayClient it is not necessary.transaction=awaitclient.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=awaitclient.get_transaction(id)Get transactions# Use await when using AsyncQvaPayClient# With SyncQvaPayClient it is not necessary.transactions=awaitclient.get_transactions(page=1)You can also read theQvaPay APIdocumentation:qvapay.com/docs.For developersThe_syncfolders were generated automatically executing the commandunasync qvapay tests.The code that is added in the_asyncfolders is automatically transformed.So every time to make a change you must run the commandunasync qvapay teststo regenerate the folders_syncwith the synchronous version of the implementation.Improvetestsimplementation and addpre-commitsystem to ensure format and style.Migration guide0.2.0 -> 0.3.0QvaPayClientwas divided into two classes:AsyncQvaPayClientandSyncQvaPayClient. Both classes have the same methods and properties, with the difference that the methods inAsyncQvaPayClientare asynchronous and inSyncQvaPayClientare synchronous.0.1.0 -> 0.2.0user_idofTransactionmodel was removedpaid_by_user_idofTransactionmodel was removed0.0.3 -> 0.1.0from qvapay.v1 import *instead offrom qvapay import *QvaPayClientinstead ofClientclient.get_infoinstead ofclient.infoclient.get_balanceinstead ofclient.balanceclient.get_transactionsinstead ofclient.transactionsContributors ✨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 theall-contributorsspecification. Contributions of any kind welcome!