Asynchronous PayStack library
Project description
aiopaystack
Asynchronous Python library for Paystack
Add your paystack secret key as an environment variable as PAY_STACK_SECRET_KEY
from paystack import Transactions
trans = Transactions()
await trans.initialize(email="sam@gmail.com", amount='5000')
# All parameters must be passed in as keywords. For both required and optional arguments.
# Passing secret key as an argument
# This replaces any key set in the environment
from paystack import Paystack
paystack = Paystack(secret_key="paystack_secret_key")
# to use one session for multiple request use the class as a context manager
async with Transactions() as trans:
res= await trans.verify(reference="ref")
# The response type for every request is a typed dict.
from typing import TypedDict, Any
Response = TypedDict('Response', {'status_code': int, 'status': bool, 'message': str, 'data': dict | Any})
## DOC Reference: <https://developers.paystack.co/v2.0/reference>
### Static Use
Don't forget to get your API key from Paystack and assign to the variable PAYSTACK_SECRET_KEY
Please reference the docs folder for usage,
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiopaystack-1.0.0.tar.gz
(16.1 kB
view hashes)
Built Distribution
Close
Hashes for aiopaystack-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80e8eac80dea08b8ec0b632404cca29376f2e3c04107bd21951d3cdc94eb11a4 |
|
MD5 | da2dcf1a5c53e7f0a3f05a6d8797cb82 |
|
BLAKE2b-256 | b8f6c6317d02924cd2059d07ebfca173b19345455aa5aad735752e94e5b9cc5e |