Stripe dependency for Nameko.
Python 3.4 - 3.7: Other versions may work but not supported.
pip install nameko-stripe
from nameko.rpc import rpc
from nameko_stripe import Stripe
class MyService(object):
name = "my_service"
stripe = Stripe()
@rpc
def list_charges(self):
return self.stripe.Charge.list()
Simply add your api_key and log level into your config.yaml
:
AMQP_URI: 'amqp://guest:guest@localhost'
...
STRIPE:
api_key: abc123
log_level: info
Just run pytest
.