pixelbin


Namepixelbin JSON
Version 4.1.0 PyPI version JSON
download
home_pagehttps://github.com/pixelbin-dev/pixelbin-python-sdk
SummaryPixelbin SDK for Python
upload_time2024-07-11 06:08:49
maintainerNone
docs_urlNone
authorPixelbin
requires_python<4.0,>=3.8
licenseMIT
keywords pixelbin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pixelbin Backend SDK for Python

Pixelbin Backend SDK for python helps you integrate the core Pixelbin features with your application.

## Getting Started

Getting started with Pixelbin Backend SDK for Python

### Installation

```
pip install pixelbin
```

---

### Usage

#### Quick Example

```python
import asyncio

from pixelbin import PixelbinClient, PixelbinConfig

# create client with your API_TOKEN
config = PixelbinConfig({
    "domain": "https://api.pixelbin.io",
    "apiSecret": "API_TOKEN",
})

# Create a pixelbin instance
pixelbin:PixelbinClient = PixelbinClient(config=config)

# Sync method call
try:
    result = pixelbin.assets.listFiles()
    print(result)
except Exception as e:
    print(e)

# Async method call
try:
    result = asyncio.get_event_loop().run_until_complete(pixelbin.assets.listFilesAsync())
    print(result)
except Exception as e:
    print(e)
```

## Security Utils

### For generating Signed URLs

Generate a signed PixelBin url

| Parameter              | Description                                          | Example                                                                                    |
| ---------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `url` (string)         | A valid Pixelbin URL to be signed                    | `https://cdn.pixelbin.io/v2/dummy-cloudname/original/__playground/playground-default.jpeg` |
| `expiry_seconds` (int) | Number of seconds the signed URL should be valid for | `20`                                                                                       |
| `access_key` (string)  | Access key of the token used for signing             | `6227274d-92c9-4b74-bef8-2528542516d8`                                                     |
| `token` (string)       | Value of the token used for signing                  | `dummy-token`                                                                              |

Example:

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

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

Usage with custom domain url

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

signed_url = sign_url(
    "https://test.example.com/v2/original/__playground/playground-default.jpeg", # url
    30, # expirySeconds
    22, # tokenId
    "dummy-token", # token
);
# signedUrl
# https://test.example.com/v2/original/__playground/playground-default.jpeg?pbs=1aef31c1e0ecd8a875b1d3184f324327f4ab4bce419d81d1eb1a818ee5f2e3eb&pbe=1695705975&pbt=22
```

## URL Utils

Pixelbin provides url utilities to construct and deconstruct Pixelbin urls.

### url_to_obj

Deconstruct a pixelbin url

| parameter               | description                                                        | example                                                                                               |
| ----------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |
| `url` (string)          | A valid Pixelbin URL                                               | `https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg` |
| `opts` (Object)         | Options for the conversion                                         | Default: `{ isCustomDomain: False }`                                                                  |
| `opts.is_custom_domain` | Indicates if the URL belongs to a custom domain (default: `False`) |

**Returns**:

| Property                  | Description                                          | Example                               |
| ------------------------- | ---------------------------------------------------- | ------------------------------------- |
| `baseURL` (string)        | Base path of the URL                                 | `https://cdn.pixelbin.io`             |
| `filePath` (string)       | Path to the file on Pixelbin storage                 | `/path/to/image.jpeg`                 |
| `version` (string)        | Version of the URL                                   | `v2`                                  |
| `cloudName` (string)      | Cloud name from the URL                              | `your-cloud-name`                     |
| `transformations` (array) | A list of transformation objects                     | `[{ "plugin": "t", "name": "flip" }]` |
| `zone` (string)           | Zone slug from the URL                               | `z-slug`                              |
| `pattern` (string)        | Transformation pattern extracted from the URL        | `t.resize(h:100,w:200)~t.flip()`      |
| `worker` (boolean)        | Indicates if the URL is a URL Translation Worker URL | `False`                               |
| `workerPath` (string)     | Input path to a URL Translation Worker               | `resize:w200,h400/folder/image.jpeg`  |
| `options` (Object)        | Query parameters added, such as "dpr" and "f_auto"   | `{ dpr: 2.5, f_auto: True}`           |

Example:

```python
from pixelbin.utils.url import url_to_obj

pixelbinUrl = "https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg?dpr=2.0&f_auto=true"
obj = url_to_obj(pixelbinUrl)
# obj
# {
#     "cloudName": "your-cloud-name",
#     "zone": "z-slug",
#     "version": "v2",
#     "options": {
#         "dpr": 2.0,
#         "f_auto": True,
#     },
#     "transformations": [
#         {
#             "plugin": "t",
#             "name": "resize",
#             "values": [
#                 {
#                     "key": "h",
#                     "value": "100"
#                 },
#                 {
#                     "key": "w",
#                     "value": "200"
#                 }
#             ]
#         },
#         {
#             "plugin": "t",
#             "name": "flip",
#         }
#     ],
#     "filePath": "path/to/image.jpeg",
#     "baseUrl": "https://cdn.pixelbin.io"
# }
```

```python
from pixelbin.utils.url import url_to_obj

customDomainUrl =
    "https://xyz.designify.media/v2/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg";
obj = url_to_obj(customDomainUrl, opts={ is_custom_domain: True })
# obj
# {
#     "zone": "z-slug",
#     "version": "v2",
#     "transformations": [
#         {
#             "plugin": "t",
#             "name": "resize",
#             "values": [
#                 {
#                     "key": "h",
#                     "value": "100"
#                 },
#                 {
#                     "key": "w",
#                     "value": "200"
#                 }
#             ]
#         },
#         {
#             "plugin": "t",
#             "name": "flip",
#         }
#     ],
#     "filePath": "path/to/image.jpeg",
#     "baseUrl": "https://xyz.designify.media",
#     "wrkr": False,
#     "workerPath": "",
#     "options": {}
# }
```

```python
workerUrl =
    "https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/wrkr/resize:h100,w:200/folder/image.jpeg";

obj = url_to_obj(workerUrl)
# obj
# {
#     "cloudName": "your-cloud-name",
#     "zone": "z-slug",
#     "version": "v2",
#     "transformations": [],
#     "filePath": "",
#     "worker": True,
#     "workerPath": "resize:h100,w:200/folder/image.jpeg",
#     "baseUrl": "https://cdn.pixelbin.io"
#     "options": {}
# }
```

### obj_to_url

Converts the extracted url obj to a Pixelbin url.

| Property                   | Description                                          | Example                               |
| -------------------------- | ---------------------------------------------------- | ------------------------------------- |
| `cloudName` (string)       | The cloudname extracted from the URL                 | `your-cloud-name`                     |
| `zone` (string)            | 6 character zone slug                                | `z-slug`                              |
| `version` (string)         | CDN API version                                      | `v2`                                  |
| `transformations` (array)  | Extracted transformations from the URL               | `[{ "plugin": "t", "name": "flip" }]` |
| `filePath` (string)        | Path to the file on Pixelbin storage                 | `/path/to/image.jpeg`                 |
| `baseUrl` (string)         | Base URL                                             | `https://cdn.pixelbin.io/`            |
| `isCustomDomain` (boolean) | Indicates if the URL is for a custom domain          | `False`                               |
| `worker` (boolean)         | Indicates if the URL is a URL Translation Worker URL | `False`                               |
| `workerPath` (string)      | Input path to a URL Translation Worker               | `resize:w200,h400/folder/image.jpeg`  |
| `options` (Object)         | Query parameters added, such as "dpr" and "f_auto"   | `{ "dpr": 2.0, "f_auto": True }`      |

```python
from pixelbin.utils.url import obj_to_url

obj = {
    cloudName: "your-cloud-name",
    zone: "z-slug",
    version: "v2",
    options: {
        dpr: 2.0,
        f_auto: True,
    },
    transformations: [
        {
            plugin: "t",
            name: "resize",
            values: [
                {
                    key: "h",
                    value: "100",
                },
                {
                    key: "w",
                    value: "200",
                },
            ],
        },
        {
            plugin: "t",
            name: "flip",
        },
    ],
    filePath: "path/to/image.jpeg",
    baseUrl: "https://cdn.pixelbin.io",
}
url = obj_to_url(obj) # obj is as shown above
# url
# https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg?dpr=2.0&f_auto=true
```

Usage with custom domain

```python
from pixelbin.utils.url import obj_to_url

obj = {
    zone: "z-slug",
    version: "v2",
    transformations: [
        {
            plugin: "t",
            name: "resize",
            values: [
                {
                    key: "h",
                    value: "100",
                },
                {
                    key: "w",
                    value: "200",
                },
            ],
        },
        {
            plugin: "t",
            name: "flip",
        },
    ],
    filePath: "path/to/image.jpeg",
    baseUrl: "https://xyz.designify.media",
    isCustomDomain: True,
};
url = Pixelbin.utils.objToUrl(obj); # obj is as shown above
# url
# https://xyz.designify.media/v2/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg
```

Usage with URL Translation Worker

```python
from pixelbin.utils.url import obj_to_url

obj = {
    cloudName: "your-cloud-name",
    zone: "z-slug",
    version: "v2",
    transformations: [],
    filePath: "",
    worker: True,
    workerPath: "resize:h100,w:200/folder/image.jpeg",
    baseUrl: "https://cdn.pixelbin.io",
};
url = Pixelbin.utils.objToUrl(obj); # obj is as shown above
# url
# https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/wrkr/resize:h100,w:200/folder/image.jpeg
```

## Usage with proxy

In case you are using a proxy, you can set `trust_env` to `True` in the `httpClientOptions` object in the `PixelbinConfig` object.
The SDK will trust the environment settings for proxy configuration or ~/.netrc file if present.

#### Quick Example

```python
import asyncio

from pixelbin import PixelbinClient, PixelbinConfig

# create client with your API_TOKEN
config = PixelbinConfig({
    "domain": "https://api.pixelbin.io",
    "apiSecret": "API_TOKEN",
    "options": {
        "httpClientOptions": {
            "trust_env": True
        }
    }
})

# Create a pixelbin instance
pixelbin:PixelbinClient = PixelbinClient(config=config)

# Sync method call
try:
    result = pixelbin.assets.listFiles()
    print(result)
except Exception as e:
    print(e)

# Async method call
try:
    result = asyncio.get_event_loop().run_until_complete(pixelbin.assets.listFilesAsync())
    print(result)
except Exception as e:
    print(e)
```

## Documentation

-   [API docs](documentation/platform/README.md)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pixelbin-dev/pixelbin-python-sdk",
    "name": "pixelbin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "Pixelbin",
    "author": "Pixelbin",
    "author_email": "dev@pixelbin.io",
    "download_url": "https://files.pythonhosted.org/packages/66/a2/ec0f27ad66847474c1fac56f0815b2fb9b9c8a31f06a13be798acf74d26c/pixelbin-4.1.0.tar.gz",
    "platform": null,
    "description": "# Pixelbin Backend SDK for Python\n\nPixelbin Backend SDK for python helps you integrate the core Pixelbin features with your application.\n\n## Getting Started\n\nGetting started with Pixelbin Backend SDK for Python\n\n### Installation\n\n```\npip install pixelbin\n```\n\n---\n\n### Usage\n\n#### Quick Example\n\n```python\nimport asyncio\n\nfrom pixelbin import PixelbinClient, PixelbinConfig\n\n# create client with your API_TOKEN\nconfig = PixelbinConfig({\n    \"domain\": \"https://api.pixelbin.io\",\n    \"apiSecret\": \"API_TOKEN\",\n})\n\n# Create a pixelbin instance\npixelbin:PixelbinClient = PixelbinClient(config=config)\n\n# Sync method call\ntry:\n    result = pixelbin.assets.listFiles()\n    print(result)\nexcept Exception as e:\n    print(e)\n\n# Async method call\ntry:\n    result = asyncio.get_event_loop().run_until_complete(pixelbin.assets.listFilesAsync())\n    print(result)\nexcept Exception as e:\n    print(e)\n```\n\n## Security Utils\n\n### For generating Signed URLs\n\nGenerate a signed PixelBin url\n\n| Parameter              | Description                                          | Example                                                                                    |\n| ---------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------ |\n| `url` (string)         | A valid Pixelbin URL to be signed                    | `https://cdn.pixelbin.io/v2/dummy-cloudname/original/__playground/playground-default.jpeg` |\n| `expiry_seconds` (int) | Number of seconds the signed URL should be valid for | `20`                                                                                       |\n| `access_key` (string)  | Access key of the token used for signing             | `6227274d-92c9-4b74-bef8-2528542516d8`                                                     |\n| `token` (string)       | Value of the token used for signing                  | `dummy-token`                                                                              |\n\nExample:\n\n```python\nfrom pixelbin.utils.security import sign_url\n\nsigned_url = sign_url(\n    \"https://cdn.pixelbin.io/v2/dummy-cloudname/original/__playground/playground-default.jpeg\", # url\n    20, # expiry_seconds\n    \"6227274d-92c9-4b74-bef8-2528542516d8\", # access_key\n    \"dummy-token\", # token\n);\n# signed_url\n# https://cdn.pixelbin.io/v2/dummy-cloudname/original/__playground/playground-default.jpeg?pbs=8eb6a00af74e57967a42316e4de238aa88d92961649764fad1832c1bff101f25&pbe=1695635915&pbt=6227274d-92c9-4b74-bef8-2528542516d8\n```\n\nUsage with custom domain url\n\n```python\nfrom pixelbin.utils.security import sign_url\n\nsigned_url = sign_url(\n    \"https://test.example.com/v2/original/__playground/playground-default.jpeg\", # url\n    30, # expirySeconds\n    22, # tokenId\n    \"dummy-token\", # token\n);\n# signedUrl\n# https://test.example.com/v2/original/__playground/playground-default.jpeg?pbs=1aef31c1e0ecd8a875b1d3184f324327f4ab4bce419d81d1eb1a818ee5f2e3eb&pbe=1695705975&pbt=22\n```\n\n## URL Utils\n\nPixelbin provides url utilities to construct and deconstruct Pixelbin urls.\n\n### url_to_obj\n\nDeconstruct a pixelbin url\n\n| parameter               | description                                                        | example                                                                                               |\n| ----------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- |\n| `url` (string)          | A valid Pixelbin URL                                               | `https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg` |\n| `opts` (Object)         | Options for the conversion                                         | Default: `{ isCustomDomain: False }`                                                                  |\n| `opts.is_custom_domain` | Indicates if the URL belongs to a custom domain (default: `False`) |\n\n**Returns**:\n\n| Property                  | Description                                          | Example                               |\n| ------------------------- | ---------------------------------------------------- | ------------------------------------- |\n| `baseURL` (string)        | Base path of the URL                                 | `https://cdn.pixelbin.io`             |\n| `filePath` (string)       | Path to the file on Pixelbin storage                 | `/path/to/image.jpeg`                 |\n| `version` (string)        | Version of the URL                                   | `v2`                                  |\n| `cloudName` (string)      | Cloud name from the URL                              | `your-cloud-name`                     |\n| `transformations` (array) | A list of transformation objects                     | `[{ \"plugin\": \"t\", \"name\": \"flip\" }]` |\n| `zone` (string)           | Zone slug from the URL                               | `z-slug`                              |\n| `pattern` (string)        | Transformation pattern extracted from the URL        | `t.resize(h:100,w:200)~t.flip()`      |\n| `worker` (boolean)        | Indicates if the URL is a URL Translation Worker URL | `False`                               |\n| `workerPath` (string)     | Input path to a URL Translation Worker               | `resize:w200,h400/folder/image.jpeg`  |\n| `options` (Object)        | Query parameters added, such as \"dpr\" and \"f_auto\"   | `{ dpr: 2.5, f_auto: True}`           |\n\nExample:\n\n```python\nfrom pixelbin.utils.url import url_to_obj\n\npixelbinUrl = \"https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg?dpr=2.0&f_auto=true\"\nobj = url_to_obj(pixelbinUrl)\n# obj\n# {\n#     \"cloudName\": \"your-cloud-name\",\n#     \"zone\": \"z-slug\",\n#     \"version\": \"v2\",\n#     \"options\": {\n#         \"dpr\": 2.0,\n#         \"f_auto\": True,\n#     },\n#     \"transformations\": [\n#         {\n#             \"plugin\": \"t\",\n#             \"name\": \"resize\",\n#             \"values\": [\n#                 {\n#                     \"key\": \"h\",\n#                     \"value\": \"100\"\n#                 },\n#                 {\n#                     \"key\": \"w\",\n#                     \"value\": \"200\"\n#                 }\n#             ]\n#         },\n#         {\n#             \"plugin\": \"t\",\n#             \"name\": \"flip\",\n#         }\n#     ],\n#     \"filePath\": \"path/to/image.jpeg\",\n#     \"baseUrl\": \"https://cdn.pixelbin.io\"\n# }\n```\n\n```python\nfrom pixelbin.utils.url import url_to_obj\n\ncustomDomainUrl =\n    \"https://xyz.designify.media/v2/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg\";\nobj = url_to_obj(customDomainUrl, opts={ is_custom_domain: True })\n# obj\n# {\n#     \"zone\": \"z-slug\",\n#     \"version\": \"v2\",\n#     \"transformations\": [\n#         {\n#             \"plugin\": \"t\",\n#             \"name\": \"resize\",\n#             \"values\": [\n#                 {\n#                     \"key\": \"h\",\n#                     \"value\": \"100\"\n#                 },\n#                 {\n#                     \"key\": \"w\",\n#                     \"value\": \"200\"\n#                 }\n#             ]\n#         },\n#         {\n#             \"plugin\": \"t\",\n#             \"name\": \"flip\",\n#         }\n#     ],\n#     \"filePath\": \"path/to/image.jpeg\",\n#     \"baseUrl\": \"https://xyz.designify.media\",\n#     \"wrkr\": False,\n#     \"workerPath\": \"\",\n#     \"options\": {}\n# }\n```\n\n```python\nworkerUrl =\n    \"https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/wrkr/resize:h100,w:200/folder/image.jpeg\";\n\nobj = url_to_obj(workerUrl)\n# obj\n# {\n#     \"cloudName\": \"your-cloud-name\",\n#     \"zone\": \"z-slug\",\n#     \"version\": \"v2\",\n#     \"transformations\": [],\n#     \"filePath\": \"\",\n#     \"worker\": True,\n#     \"workerPath\": \"resize:h100,w:200/folder/image.jpeg\",\n#     \"baseUrl\": \"https://cdn.pixelbin.io\"\n#     \"options\": {}\n# }\n```\n\n### obj_to_url\n\nConverts the extracted url obj to a Pixelbin url.\n\n| Property                   | Description                                          | Example                               |\n| -------------------------- | ---------------------------------------------------- | ------------------------------------- |\n| `cloudName` (string)       | The cloudname extracted from the URL                 | `your-cloud-name`                     |\n| `zone` (string)            | 6 character zone slug                                | `z-slug`                              |\n| `version` (string)         | CDN API version                                      | `v2`                                  |\n| `transformations` (array)  | Extracted transformations from the URL               | `[{ \"plugin\": \"t\", \"name\": \"flip\" }]` |\n| `filePath` (string)        | Path to the file on Pixelbin storage                 | `/path/to/image.jpeg`                 |\n| `baseUrl` (string)         | Base URL                                             | `https://cdn.pixelbin.io/`            |\n| `isCustomDomain` (boolean) | Indicates if the URL is for a custom domain          | `False`                               |\n| `worker` (boolean)         | Indicates if the URL is a URL Translation Worker URL | `False`                               |\n| `workerPath` (string)      | Input path to a URL Translation Worker               | `resize:w200,h400/folder/image.jpeg`  |\n| `options` (Object)         | Query parameters added, such as \"dpr\" and \"f_auto\"   | `{ \"dpr\": 2.0, \"f_auto\": True }`      |\n\n```python\nfrom pixelbin.utils.url import obj_to_url\n\nobj = {\n    cloudName: \"your-cloud-name\",\n    zone: \"z-slug\",\n    version: \"v2\",\n    options: {\n        dpr: 2.0,\n        f_auto: True,\n    },\n    transformations: [\n        {\n            plugin: \"t\",\n            name: \"resize\",\n            values: [\n                {\n                    key: \"h\",\n                    value: \"100\",\n                },\n                {\n                    key: \"w\",\n                    value: \"200\",\n                },\n            ],\n        },\n        {\n            plugin: \"t\",\n            name: \"flip\",\n        },\n    ],\n    filePath: \"path/to/image.jpeg\",\n    baseUrl: \"https://cdn.pixelbin.io\",\n}\nurl = obj_to_url(obj) # obj is as shown above\n# url\n# https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg?dpr=2.0&f_auto=true\n```\n\nUsage with custom domain\n\n```python\nfrom pixelbin.utils.url import obj_to_url\n\nobj = {\n    zone: \"z-slug\",\n    version: \"v2\",\n    transformations: [\n        {\n            plugin: \"t\",\n            name: \"resize\",\n            values: [\n                {\n                    key: \"h\",\n                    value: \"100\",\n                },\n                {\n                    key: \"w\",\n                    value: \"200\",\n                },\n            ],\n        },\n        {\n            plugin: \"t\",\n            name: \"flip\",\n        },\n    ],\n    filePath: \"path/to/image.jpeg\",\n    baseUrl: \"https://xyz.designify.media\",\n    isCustomDomain: True,\n};\nurl = Pixelbin.utils.objToUrl(obj); # obj is as shown above\n# url\n# https://xyz.designify.media/v2/z-slug/t.resize(h:100,w:200)~t.flip()/path/to/image.jpeg\n```\n\nUsage with URL Translation Worker\n\n```python\nfrom pixelbin.utils.url import obj_to_url\n\nobj = {\n    cloudName: \"your-cloud-name\",\n    zone: \"z-slug\",\n    version: \"v2\",\n    transformations: [],\n    filePath: \"\",\n    worker: True,\n    workerPath: \"resize:h100,w:200/folder/image.jpeg\",\n    baseUrl: \"https://cdn.pixelbin.io\",\n};\nurl = Pixelbin.utils.objToUrl(obj); # obj is as shown above\n# url\n# https://cdn.pixelbin.io/v2/your-cloud-name/z-slug/wrkr/resize:h100,w:200/folder/image.jpeg\n```\n\n## Usage with proxy\n\nIn case you are using a proxy, you can set `trust_env` to `True` in the `httpClientOptions` object in the `PixelbinConfig` object.\nThe SDK will trust the environment settings for proxy configuration or ~/.netrc file if present.\n\n#### Quick Example\n\n```python\nimport asyncio\n\nfrom pixelbin import PixelbinClient, PixelbinConfig\n\n# create client with your API_TOKEN\nconfig = PixelbinConfig({\n    \"domain\": \"https://api.pixelbin.io\",\n    \"apiSecret\": \"API_TOKEN\",\n    \"options\": {\n        \"httpClientOptions\": {\n            \"trust_env\": True\n        }\n    }\n})\n\n# Create a pixelbin instance\npixelbin:PixelbinClient = PixelbinClient(config=config)\n\n# Sync method call\ntry:\n    result = pixelbin.assets.listFiles()\n    print(result)\nexcept Exception as e:\n    print(e)\n\n# Async method call\ntry:\n    result = asyncio.get_event_loop().run_until_complete(pixelbin.assets.listFilesAsync())\n    print(result)\nexcept Exception as e:\n    print(e)\n```\n\n## Documentation\n\n-   [API docs](documentation/platform/README.md)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pixelbin SDK for Python",
    "version": "4.1.0",
    "project_urls": {
        "Homepage": "https://github.com/pixelbin-dev/pixelbin-python-sdk",
        "Repository": "https://github.com/pixelbin-dev/pixelbin-python-sdk"
    },
    "split_keywords": [
        "pixelbin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "790808d60545ac5c9c2b15a018694514eaf765c38438a82fee9b4ed3c56221e0",
                "md5": "d77c8d33ba99108a633301805664b99a",
                "sha256": "ea15eb06cd05e0aeb829b3451a4a227dc98bcca8bbc6c458e3106fdad8916bd6"
            },
            "downloads": -1,
            "filename": "pixelbin-4.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d77c8d33ba99108a633301805664b99a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 52644,
            "upload_time": "2024-07-11T06:08:47",
            "upload_time_iso_8601": "2024-07-11T06:08:47.111617Z",
            "url": "https://files.pythonhosted.org/packages/79/08/08d60545ac5c9c2b15a018694514eaf765c38438a82fee9b4ed3c56221e0/pixelbin-4.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "66a2ec0f27ad66847474c1fac56f0815b2fb9b9c8a31f06a13be798acf74d26c",
                "md5": "81f363c93142db26c9e41e2c1502e0f2",
                "sha256": "9f74b4897bbb753046c48791dbfbe91e2cf7ad91dd574d05cd37243265514287"
            },
            "downloads": -1,
            "filename": "pixelbin-4.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "81f363c93142db26c9e41e2c1502e0f2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 32461,
            "upload_time": "2024-07-11T06:08:49",
            "upload_time_iso_8601": "2024-07-11T06:08:49.266183Z",
            "url": "https://files.pythonhosted.org/packages/66/a2/ec0f27ad66847474c1fac56f0815b2fb9b9c8a31f06a13be798acf74d26c/pixelbin-4.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-11 06:08:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pixelbin-dev",
    "github_project": "pixelbin-python-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pixelbin"
}
        
Elapsed time: 0.67335s