Skip to content

Commit d8db065

Browse files
committed
Add sandbox info to README and docs
1 parent 0c4ec75 commit d8db065

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,30 @@ paddle.list_products()
4444
```
4545

4646

47+
### Paddle sandbox environment
48+
49+
The [Paddle sandbox environment](https://developer.paddle.com/getting-started/sandbox) is a separate Paddle environment which can be used for development and testing. You are required to create a new account in this environment, different to your production account.
50+
51+
Once you have this account setup and configured you can user the sandbox account by passing `sandbox=True` when initialising the Paddle Client. This will send all API calls to the Paddle sandbox URLs instead of the production URLs
52+
53+
```python
54+
from paddle import PaddleClient
55+
56+
57+
paddle = PaddleClient(vendor_id=12345, api_key='myapikey', sandbox=True)
58+
```
59+
60+
It is also possible to turn the sandbox environment on using an environmental variable called `PADDLE_SANDBOX`:
61+
```bash
62+
export PADDLE_SANDBOX="true"
63+
```
64+
```python
65+
from paddle import PaddleClient
66+
67+
68+
paddle = PaddleClient(vendor_id=12345, api_key='myapikey')
69+
```
70+
4771
## Documentation
4872

4973
The full documentation is available on Read the Docs: https://paddle-client.readthedocs.io

docs/getting_started.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,32 @@ If ``vendor_id`` and ``api_key`` are not passed through when initalising Paddle
4848
4949
paddle = PaddleClient()
5050
paddle.list_products()
51+
52+
53+
Paddle sandbox environment
54+
--------------------------
55+
56+
The `Paddle sandbox environment <https://developer.paddle.com/getting-started/sandbox>`_ is a separate Paddle environment which can be used for development and testing. You are required to create a new account in this environment, different to your production account.
57+
58+
Once you have this account setup and configured you can user the sandbox account by passing ``sandbox=True`` when initialising the Paddle Client. This will send all API calls to the Paddle sandbox URLs instead of the production URLs
59+
60+
61+
.. code-block:: python
62+
63+
from paddle import PaddleClient
64+
65+
paddle = PaddleClient(vendor_id=12345, api_key='myapikey', sandbox=True)
66+
67+
68+
It is also possible to turn the sandbox environment on using an environmental variable called ``PADDLE_SANDBOX``:
69+
70+
.. code-block:: bash
71+
72+
export PADDLE_SANDBOX="true"
73+
74+
75+
.. code-block:: python
76+
77+
from paddle import PaddleClient
78+
79+
paddle = PaddleClient(vendor_id=12345, api_key='myapikey')

0 commit comments

Comments
 (0)