Skip to content

Commit

Permalink
paddle-billing-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
Invincibear committed Apr 5, 2024
1 parent 8816c7c commit e97b1d8
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
id: check_version
run: |
LOCAL_VERSION=$(python setup.py --version)
PYPI_VERSION=$(curl -s https://pypi.org/pypi/paddle-billing-python-sdk/json | jq -r '.info.version')
PYPI_VERSION=$(curl -s https://pypi.org/pypi/paddle-python-sdk/json | jq -r '.info.version')
if [ "$LOCAL_VERSION" != "$PYPI_VERSION" ]; then
echo "Version has changed. Current version: $LOCAL_VERSION"
echo "should_publish=true" >> $GITHUB_ENV
Expand Down
9 changes: 3 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Paddle Billing Python SDK Changelog
# Paddle Python SDK Changelog


## Version 0.0.1a1 (2024-01-22)
## Version 0.1.0 (2024-04-05)

### Features:
- We exist

### Bug fixes:
- None, perfect code /s
- Initial launch!
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
## Contributing

If you've spotted a problem with this package or have a new feature request please [open an issue](https://github.com/Invincibear/paddle-billing-python-sdk/issues) or a [submit a PR](https://github.com/Invincibear/paddle-billing-python-sdk/pulls).
If you've spotted a problem with this package or have a new feature request please [open an issue](https://github.com/PaddleHQ/paddle-python-sdk/issues) or a [submit a PR](https://github.com/PaddleHQ/paddle-python-sdk/pulls).


## Set up dev environment
``` bash
git clone https://github.com/invincibear/paddle-billing-python-sdk && \
cd paddle-billing-python-sdk && \
git clone https://github.com/PaddleHQ/paddle-python-sdk && \
cd paddle-python-sdk && \
pip install .[dev]
```


## Run tests
Python `pytest` tests can be run either by changing into the `paddle-billing-python-sdk`, activating the `venv`, and running `pytest`, or by running `pytest` directly
Python `pytest` tests can be run either by changing into the `paddle-python-sdk`, activating the `venv`, and running `pytest`, or by running `pytest` directly
``` bash
cd paddle-billing-python-sdk && .venv/bin/pytest
cd paddle-python-sdk && .venv/bin/pytest
```
``` bash
cd paddle-billing-python-sdk && \
cd paddle-python-sdk && \
source .venv/bin/activate && \
pytest
```
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[![Build Status](https://img.shields.io/github/actions/workflow/status/Invincibear/paddle-billing-python-sdk/publish_to_pypi.yml)](https://github.com/Invincibear/paddle-billing-python-sdk/actions/?query=branch%3Amain)
[![PyPI](https://img.shields.io/pypi/v/paddle-billing-python-sdk.svg)](https://pypi.python.org/pypi/paddle-billing-python-sdk)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/paddle-billing-python-sdk.svg)](https://pypi.python.org/pypi/paddle-billing-python-sdk/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://img.shields.io/github/actions/workflow/status/PaddleHQ/paddle-python-sdk/publish_to_pypi.yml)](https://github.com/PaddleHQ/paddle-python-sdk/actions/?query=branch%3Amain)
[![PyPI](https://img.shields.io/pypi/v/paddle-python-sdk.svg)](https://pypi.python.org/pypi/paddle-python-sdk)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/paddle-python-sdk.svg)](https://pypi.python.org/pypi/paddle-python-sdk/)
[![License: Apache 2.0](https://img.shields.io/github/license/PaddleHQ/paddle-python-sdk)](http://www.apache.org/licenses/LICENSE-2.0)


# paddle-python-sdk
[Paddle Billing](https://www.paddle.com/billing?utm_source=dx&utm_medium=paddle-python-sdk) is a complete digital product sales and subscription management platform, designed for modern software businesses. It helps you increase your revenue, retain customers, and scale your operations.

# paddle-billing-python-sdk
A Python wrapper for the new Paddle Billing SDK, based on Paddle's official [paddle-php-sdk](https://github.com/PaddleHQ/paddle-php-sdk/)
This is a [Python](https://www.python.org/) SDK that you can use to integrate Paddle Billing with applications written in Python.

For working with Paddle in your frontend, use [Paddle.js](https://developer.paddle.com/paddlejs/overview?utm_source=dx&utm_medium=paddle-python-sdk). You can open checkouts, securely collect payment information, build pricing pages, and integrate with Paddle Retain.

### Core developers
- [Invincibear](https://github.com/Invincibear)

> **Important:** This package works with Paddle Billing. It does not support Paddle Classic. To work with Paddle Classic, see: [Paddle Classic API reference](https://developer.paddle.com/classic/api-reference/1384a288aca7a-api-reference?utm_source=dx&utm_medium=paddle-python-sdk)

## Table of contents
Expand All @@ -30,9 +30,9 @@ Python>=3.11 (for native type hinting, StrEnum, trailing commas, f-strings)


## Install
Because `paddle-billing-python-sdk` is [available on PyPi](https://pypi.org/project/paddle-billing-python-sdk/), installation is as simple as running the following `pip` command:
Because `paddle-python-sdk` is [available on PyPi](https://pypi.org/project/paddle-python-sdk/), installation is as simple as running the following `pip` command:

`pip install paddle-billing-python-sdk`
`pip install paddle-python-sdk`



Expand Down Expand Up @@ -66,7 +66,7 @@ Keep in mind that API keys are separate for your sandbox and live accounts, so y


## Examples
There are examples included in the [examples folder](https://github.com/Invincibear/paddle-billing-python-sdk/tree/main/examples). To prevent leaking errors we recommend encapsulating Paddle operations inside Try/Except blocks. For brevity, most of the examples below do not do this.
There are examples included in the [examples folder](https://github.com/PaddleHQ/paddle-python-sdk/tree/main/examples). To prevent leaking errors we recommend encapsulating Paddle operations inside Try/Except blocks. For brevity, most of the examples below do not do this.

### List entities
You can list supported entities with the `list()` method in the resource. It returns an iterator to help when working with multiple pages.
Expand Down Expand Up @@ -154,5 +154,5 @@ integrity_check = Verifier().verify(request, Secret('WEBHOOK_SECRET_KEY')
```

## Learn more
- [Paddle API reference](https://developer.paddle.com/api-reference/overview?utm_source=dx&utm_medium=paddle-billing-python-sdk)
- [Sign up for Paddle Billing](https://login.paddle.com/signup?utm_source=dx&utm_medium=paddle-billing-python-sdk)
- [Paddle API reference](https://developer.paddle.com/api-reference/overview?utm_source=dx&utm_medium=paddle-python-sdk)
- [Sign up for Paddle Billing](https://login.paddle.com/signup?utm_source=dx&utm_medium=paddle-python-sdk)
2 changes: 1 addition & 1 deletion paddle_billing/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def build_request_session(self) -> Session:
'Authorization': f"Bearer {self.__api_key}",
'Content-Type': 'application/json',
'Paddle-Version': str(self.use_api_version),
'User-Agent': 'paddle-billing-python-sdk',
'User-Agent': 'paddle-python-sdk',
})

# Configure retries
Expand Down
20 changes: 11 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
from setuptools import setup, find_packages
from setuptools import setup, find_packages


setup(
version = '0.1.0b2',
version = '0.1.0',

author = 'Corey Regan',
author_email = 'regan.corey@gmail.com',
description = 'A Python wrapper for the Paddle Billing API',
name = 'paddle-billing-python-sdk',
packages = find_packages(),
python_requires = '>=3.11',
url = 'https://github.com/invincibear/paddle-billing-python-sdk',
author = 'Paddle and contributors',
author_email = 'team-dx@paddle.com',
description = "Paddle's Python SDK for Paddle Billing",
keywords = ['paddle', 'sdk', 'python'],
license = 'Apache-2.0',
name = 'paddle-python-sdk',
packages = find_packages(),
python_requires = '>=3.11',
url = 'https://developer.paddle.com/api-reference/overview',

long_description = open('README.md').read(),
long_description_content_type = 'text/markdown',
Expand Down

0 comments on commit e97b1d8

Please sign in to comment.