Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Non official, but friendly QvaPay library for the Python language.
You can install this package by using the pip tool and installing:
pip install qvapay
Or
easy_install qvapay
Create your account to process payments through QvaPay at qvapay.com/register.
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())
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
...
# Use await when using AsyncQvaPayClient
# With SyncQvaPayClient it is not necessary.
info = await client.get_info()
# Use await when using AsyncQvaPayClient
# With SyncQvaPayClient it is not necessary.
balance = await client.get_balance()
# 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
)
# Use await when using AsyncQvaPayClient
# With SyncQvaPayClient it is not necessary.
transaction = await client.get_transaction(id)
# 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.
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.
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.user_id
of Transaction
model was removedpaid_by_user_id
of Transaction
model was removedfrom 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
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!
FAQs
Python SDK for the QvaPay API
We found that qvapay demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.