This project is no longer actively maintained.
As the header says, this is a wrapper around the Stripe API using asyncio and aiohttp. Stripe data is modeled using frozen objects built using attrs. Required arguments to API calls are explicitly listed while optional arguments are simply keyword arguments.
asyncio_stripe be installed via pip or by simply running the included setup.py
script:
pip install asyncio_stripe
# OR
python setup.py install --root <destination> --record installed_files.txt
Create a Client:
Authorize then capture $1.00 from a Customer's default card:
Capture funds using a token:
Create, retrieve and pretty print a customer:
import pprint
import attr
customer = await client.create_customer(
email='new_user@invalid',
source='tok_aabbcc')
ret_customer = await client.retrieve_customer(
customer.id)
customers = await client.list_customers(limit=1)
assert(customer == ret_customer == customers[0])
pprint.pprint(attr.asdict(customer))
While this project represents the company in no way, thanks to Kuvée (https://kuvee.com) for generously sponsoring some of the time I've spent in development.