Skip to content

Commit 8a57d87

Browse files
committed
Rename to Paddle Client for org move
1 parent 11d4445 commit 8a57d87

7 files changed

Lines changed: 27 additions & 33 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ _Note: As `tox` runs the test suite multiple times, it is configured to skip any
127127

128128
## Submitting changes
129129

130-
Please send a [GitHub Pull Request to paddle-python](https://github.com/pyepye/paddle-python/pull/new/master) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)).
130+
Please send a [GitHub Pull Request to paddle-python](https://github.com/paddle-python/paddle-client/pull/new/master) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)).
131131

132132
All changes should have at least one test to accompany it, either to prove the bug it is fixing has indeed been fixed on to ensure a new feature works as expected.
133133

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Paddle Python
1+
# Paddle Client
22

33
A python (3.5+) wrapper around the [Paddle.com](https://paddle.com/) [API](https://developer.paddle.com/api-reference/intro)
44

@@ -11,7 +11,7 @@ _Note: This is a work in progress, not all of the Paddle endpoints have been imp
1111
### Installation
1212

1313
```bash
14-
pip install paddle-python
14+
pip install paddle-client
1515
```
1616

1717

@@ -20,10 +20,10 @@ pip install paddle-python
2020
To use the Paddle API you will need a Paddle Vendor ID and API key which can be found on [Paddle's authentication page](https://vendors.paddle.com/authentication)
2121

2222
```python
23-
from paddle import Paddle
23+
from paddle import PaddleClient
2424

2525

26-
paddle = Paddle(vendor_id=12345, api_key='myapikey')
26+
paddle = PaddleClient(vendor_id=12345, api_key='myapikey')
2727
paddle.list_products()
2828
```
2929

@@ -34,10 +34,10 @@ export PADDLE_API_KEY="myapikey"
3434
```
3535

3636
```python
37-
from paddle import Paddle
37+
from paddle import PaddleClient
3838

3939

40-
paddle = Paddle()
40+
paddle = PaddleClient()
4141
paddle.list_products()
4242
```
4343

@@ -49,7 +49,7 @@ Coming soon. Please see `Working endpoints` below for basic usage.
4949

5050
## Contributing
5151

52-
All contributions are welcome and appreciated. Please see [CONTRIBUTING.md](https://github.com/pyepye/paddle-python/blob/master/CONTRIBUTING.md) for more details including details on how to run tests etc.
52+
All contributions are welcome and appreciated. Please see [CONTRIBUTING.md](https://github.com/paddle-python/paddle-client/blob/master/CONTRIBUTING.md) for more details including details on how to run tests etc.
5353

5454

5555
## Working endpoints

paddle/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
from .paddle import Paddle, PaddleException # NOQA: F401
2-
3-
__version__ = '0.1.0'
1+
from .paddle import PaddleClient, PaddleException # NOQA: F401

paddle/paddle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __str__(self) -> str:
3333
return self.message
3434

3535

36-
class Paddle():
36+
class PaddleClient():
3737

3838
def __init__(self, vendor_id: int = None, api_key: str = None):
3939
if not vendor_id:

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[tool.poetry]
2-
name = "paddle-python"
2+
name = "paddle-client"
33
packages = [
44
{include = "paddle"}
55
]
6-
version = "0.5.1"
6+
version = "0.6.0"
77
description = "Python wrapper around the Paddle.com API"
88
license = "MIT"
99
authors = ["Matt Pye <pyematt@gmail.com>"]
1010
readme = "README.md"
11-
repository = "https://github.com/pyepye/paddle-python"
12-
homepage = "https://github.com/pyepye/paddle-python"
11+
repository = "https://github.com/paddle-python/paddle-client"
12+
homepage = "https://github.com/paddle-python/paddle-client"
1313
keywords = ["paddle", "paddle.com", "payments", "billing", "commerce", "finance", "saas"]
1414

1515
[tool.poetry.dependencies]

tests/test_paddle.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from paddle import Paddle, PaddleException, __version__
3+
from paddle import PaddleClient, PaddleException
44

55

66
class BadPaddleDataWarning(UserWarning):
@@ -9,7 +9,7 @@ class BadPaddleDataWarning(UserWarning):
99

1010
@pytest.fixture(scope='session')
1111
def paddle_client():
12-
paddle = Paddle()
12+
paddle = PaddleClient()
1313
return paddle
1414

1515

@@ -28,42 +28,38 @@ def unset_api_key(monkeypatch):
2828
monkeypatch.delenv('PADDLE_API_KEY', raising=False)
2929

3030

31-
def test_version():
32-
assert __version__ == '0.1.0'
33-
34-
3531
def test_paddle__manual_vendor_id_and_api_key(unset_vendor_id, unset_api_key):
3632
with pytest.raises(ValueError):
37-
Paddle(api_key='test')
33+
PaddleClient(api_key='test')
3834
try:
39-
Paddle(api_key='test')
35+
PaddleClient(api_key='test')
4036
except ValueError as error:
4137
assert str(error) == 'Vendor ID not set'
4238

4339

4440
def test_paddle_vendor_id_not_set(unset_vendor_id):
4541
with pytest.raises(ValueError):
46-
Paddle(api_key='test')
42+
PaddleClient(api_key='test')
4743
try:
48-
Paddle(api_key='test')
44+
PaddleClient(api_key='test')
4945
except ValueError as error:
5046
assert str(error) == 'Vendor ID not set'
5147

5248

5349
def test_paddle_vendor_id_not_int(set_vendor_id_to_invalid):
5450
with pytest.raises(ValueError):
55-
Paddle(api_key='test')
51+
PaddleClient(api_key='test')
5652
try:
57-
Paddle(api_key='test')
53+
PaddleClient(api_key='test')
5854
except ValueError as error:
5955
assert str(error) == 'Vendor ID must be a number'
6056

6157

6258
def test_paddle_api_key_not_set(unset_api_key):
6359
with pytest.raises(ValueError):
64-
Paddle(vendor_id=1)
60+
PaddleClient(vendor_id=1)
6561
try:
66-
Paddle(vendor_id=1)
62+
PaddleClient(vendor_id=1)
6763
except ValueError as error:
6864
assert str(error) == 'API key not set'
6965

tests/test_user_history.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import pytest
22

3-
from paddle import Paddle, PaddleException
3+
from paddle import PaddleClient, PaddleException
44

55
from .test_paddle import paddle_client, unset_vendor_id # NOQA: F401
66

77

88
def test_get_user_history_with_vendor_id(unset_vendor_id): # NOQA: F811
99
email = 'test@example.com'
1010
vendor_id = 11
11-
paddle = Paddle(vendor_id=vendor_id)
11+
paddle = PaddleClient(vendor_id=vendor_id)
1212
response = paddle.get_user_history(email=email, vendor_id=vendor_id)
1313
assert response == 'We\'ve sent details of your past transactions, licenses and downloads to you via email.' # NOQA: E501
1414

@@ -33,6 +33,6 @@ def test_get_user_history_with_product_id(paddle_client): # NOQA: F811
3333
def test_get_user_history_missing_vendoer_id_and_product_id(unset_vendor_id): # NOQA: F811, E501
3434
email = 'test@example.com'
3535
vendor_id = 11
36-
paddle = Paddle(vendor_id=vendor_id)
36+
paddle = PaddleClient(vendor_id=vendor_id)
3737
response = paddle.get_user_history(email=email)
3838
assert response == 'We\'ve sent details of your past transactions, licenses and downloads to you via email.' # NOQA: E501

0 commit comments

Comments
 (0)