Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
pip install dist/pixelbin-*.tar.gz


- name: Run tests
- name: Run test
run: |
coverage run -m pytest tests/pixelbin_test.py
coverage report
coverage html
coverage html
39 changes: 22 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,54 @@
## 4.3.0

- Introduces PixelBin's Prediction APIs that offer a suite of AI-powered image editing tools designed to streamline your media workflow.
- Added a wrapper around the Prediction API allowing developers to easily create, track, and manage prediction jobs.

## 4.2.0

- Added [upload](./README.md#upload) method.
- Removed support for signature generation for APIs.
- Added [upload](./README.md#upload) method.
- Removed support for signature generation for APIs.

# 4.1.0

- Fixed parameters for `getPresets` method.
- Added support for using a proxy with the Pixelbin SDK by setting the `trust_env` option to `True` in the `httpClientOptions` object of `PixelbinConfig`.
- When `trust_env` is set to `True`, the SDK will trust the environment settings for proxy configuration or the `~/.netrc` file if present.
- Fixed parameters for `getPresets` method.
- Added support for using a proxy with the Pixelbin SDK by setting the `trust_env` option to `True` in the `httpClientOptions` object of `PixelbinConfig`.
- When `trust_env` is set to `True`, the SDK will trust the environment settings for proxy configuration or the `~/.netrc` file if present.

# 4.0.0

- **Breaking Change:** Function signature of `sign_url` in `security.py` has been updated. The argument `token_id` has been replaced with `access_key`. Access key for a token can be found by going to console.pixelbin.io > `Settings` > `Tokens` > Click on any Token > `Access Key`.
- **Breaking Change:** Function signature of `sign_url` in `security.py` has been updated. The argument `token_id` has been replaced with `access_key`. Access key for a token can be found by going to console.pixelbin.io > `Settings` > `Tokens` > Click on any Token > `Access Key`.

# 3.2.0

- Added method for generating V2 Signed Multipart Upload Urls `createSignedUrlV2`
- Added method for generating V2 Signed Multipart Upload Urls `createSignedUrlV2`

# 3.1.1

- Fixed regex for Custom Domain URLs
- Fixed regex for Custom Domain URLs

# 3.1.0

- Added support for generating signed Custom Domain and PixelBin CDN urls
- Added support for generating signed Custom Domain and PixelBin CDN urls

# 3.0.0

- Fixed bugs parsing `dpr` & `f_auto` in `obj_to_url` & `url_to_obj`
- Added support for parsing Custom Domains in `obj_to_url` and `url_to_obj`
- Improved support for worker urls in `obj_to_url` and `url_to_obj`
- Fixed bugs parsing `dpr` & `f_auto` in `obj_to_url` & `url_to_obj`
- Added support for parsing Custom Domains in `obj_to_url` and `url_to_obj`
- Improved support for worker urls in `obj_to_url` and `url_to_obj`

# 2.2.0

- Added a method for obtaining the context of a file via url.
- Added a method for obtaining the context of a file via url.

# 2.1.1

- Removed unused model
- Rewritten test suite to improve test reliability
- Removed unused model
- Rewritten test suite to improve test reliability

# 2.1.0

- Fixed `tags` being stringified inadvertently. If you are experiencing validation errors around `tags` in previous versions, you should upgrade your SDKs.
- Fixed `tags` being stringified inadvertently. If you are experiencing validation errors around `tags` in previous versions, you should upgrade your SDKs.

# 2.0.0

- method for getting org details has changed from `getAppByToken` => `getAppOrgDetails`
- method for getting org details has changed from `getAppByToken` => `getAppOrgDetails`
52 changes: 26 additions & 26 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,37 @@

1. **Updated Function Signature in `security.py`**

The arguments for `sign_url` function has been updated. The `token_id` parameter has been replaced with `access_key`.
The arguments for `sign_url` function has been updated. The `token_id` parameter has been replaced with `access_key`.

**Previous Method (v3.1.x and above):**
**Previous Method (v3.1.x and above):**

```python
from pixelbin.utils.security import sign_url
```python
from pixelbin.utils.security import sign_url

signed_url = sign_url(
url="https://cdn.pixelbin.io/v2/dummy-cloudname/original/__playground/playground-default.jpeg",
expiry_seconds=20,
token_id=42,
token="dummy-token",
);
```
signed_url = sign_url(
url="https://cdn.pixelbin.io/v2/dummy-cloudname/original/__playground/playground-default.jpeg",
expiry_seconds=20,
token_id=42,
token="dummy-token",
);
```

**New Method (v4.x.x):**
**New Method (v4.x.x):**

```python
from pixelbin.utils.security import sign_url
```python
from pixelbin.utils.security import sign_url

signed_url = sign_url(
url="https://cdn.pixelbin.io/v2/dummy-cloudname/original/__playground/playground-default.jpeg",
expiry_seconds=20,
access_key="6227274d-92c9-4b74-bef8-2528542516d8",
token="dummy-token",
);
```
signed_url = sign_url(
url="https://cdn.pixelbin.io/v2/dummy-cloudname/original/__playground/playground-default.jpeg",
expiry_seconds=20,
access_key="6227274d-92c9-4b74-bef8-2528542516d8",
token="dummy-token",
);
```

**How to Find Your Access Key:**
**How to Find Your Access Key:**

- Go to `console.pixelbin.io`
- Navigate to `Settings` > `Tokens`
- Click on any Token
- Find the `Access Key` in the token details
- Go to `console.pixelbin.io`
- Navigate to `Settings` > `Tokens`
- Click on any Token
- Find the `Access Key` in the token details
Loading