Metadata-Version: 2.1
Name: yoco-python
Version: 0.1.3
Summary: Python SDK for Yoco API
Home-page: https://github.com/QuintenWiggill/yoco-python
Author: Quinten Wiggill
Author-email: qwiggill@gmail.com
License: MIT
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE

# Yoco Python SDK

### Installation
```
pip install yoco-python
```

### Getting started
How to call the API using the Python SDK:


```Python
from yoco_python import YocoClient

# Instantiate the yoco client
yoco = YocoClient(
    secret_key='YOUR_SECRET_KEY', # Replace with your Yoco secret key
    charge_token='YOUR_CHARGE_TOKEN', # Replace with your token generated by the frontend API
    amount_in_cents=1000, # The amount in cents to charge the user
    currency='ZAR', # The currency of the amount
)

# Call the charge api
charge_response = yoco.charge()

# Call the refund api
if yoco.charge_success:
    refund_response = yoco.refund()
```
