Skip to content

Commit 4af0f61

Browse files
authored
Merge pull request #2 from channel3-ai/release-please--branches--main--changes--next
Stainless SDK
2 parents ab28a6a + fe8d68d commit 4af0f61

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+495
-393
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
run: |
2929
bash ./bin/publish-pypi
3030
env:
31-
PYPI_TOKEN: ${{ secrets.PUBLIC_SDK_PYPI_TOKEN || secrets.PYPI_TOKEN }}
31+
PYPI_TOKEN: ${{ secrets.CHANNEL3_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
run: |
1919
bash ./bin/check-release-environment
2020
env:
21-
PYPI_TOKEN: ${{ secrets.PUBLIC_SDK_PYPI_TOKEN || secrets.PYPI_TOKEN }}
21+
PYPI_TOKEN: ${{ secrets.CHANNEL3_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.0.2"
2+
".": "2.0.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 6
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/channel3%2Fpublic-sdk-eb8fa9262033b1e81549b926b706237a5796a41b06f00cea2d1e2a3362bd163f.yml
33
openapi_spec_hash: 4b6160fcd0267ff62ebd54f5c05c88c6
4-
config_hash: c94dfdce8fd8d58cbba9af3bbc53aec4
4+
config_hash: 8e18f4f27ef0200cac8c5ee682f53ab8

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 2.0.0 (2025-09-16)
4+
5+
Full Changelog: [v0.0.2...v2.0.0](https://github.com/channel3-ai/sdk-python/compare/v0.0.2...v2.0.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([f91f4f1](https://github.com/channel3-ai/sdk-python/commit/f91f4f163ea386464efa5b307ec11b689922493e))
10+
11+
12+
### Chores
13+
14+
* update SDK settings ([35e85c7](https://github.com/channel3-ai/sdk-python/commit/35e85c70a123d6dd8b745999388082499562347e))
15+
316
## 0.0.2 (2025-09-16)
417

518
Full Changelog: [v0.0.1...v0.0.2](https://github.com/channel3-ai/sdk-python/compare/v0.0.1...v0.0.2)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $ pip install -r requirements-dev.lock
3636

3737
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may
3838
result in merge conflicts between manual patches and changes from the generator. The generator will never
39-
modify the contents of the `src/public_sdk/lib/` and `examples/` directories.
39+
modify the contents of the `src/channel3_sdk/lib/` and `examples/` directories.
4040

4141
## Adding and running examples
4242

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Public SDK
189+
Copyright 2025 Channel3
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 51 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Public SDK Python API library
1+
# Channel3 Python API library
22

33
<!-- prettier-ignore -->
4-
[![PyPI version](https://img.shields.io/pypi/v/public_sdk.svg?label=pypi%20(stable))](https://pypi.org/project/public_sdk/)
4+
[![PyPI version](https://img.shields.io/pypi/v/channel3_sdk.svg?label=pypi%20(stable))](https://pypi.org/project/channel3_sdk/)
55

6-
The Public SDK Python library provides convenient access to the Public SDK REST API from any Python 3.8+
6+
The Channel3 Python library provides convenient access to the Channel3 REST API from any Python 3.8+
77
application. The library includes type definitions for all request params and response fields,
88
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
99

@@ -16,44 +16,45 @@ The full API of this library can be found in [api.md](api.md).
1616
## Installation
1717

1818
```sh
19-
# install from the production repo
20-
pip install git+ssh://[email protected]/channel3-ai/sdk-python.git
19+
# install from PyPI
20+
pip install channel3_sdk
2121
```
2222

23-
> [!NOTE]
24-
> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install public_sdk`
25-
2623
## Usage
2724

2825
The full API of this library can be found in [api.md](api.md).
2926

3027
```python
3128
import os
32-
from public_sdk import PublicSDK
29+
from channel3_sdk import Channel3
3330

34-
client = PublicSDK(
35-
api_key=os.environ.get("PUBLIC_SDK_API_KEY"), # This is the default and can be omitted
31+
client = Channel3(
32+
api_key=os.environ.get("CHANNEL3_API_KEY"), # This is the default and can be omitted
33+
# defaults to "production".
34+
environment="development",
3635
)
3736

3837
response = client.search.perform()
3938
```
4039

4140
While you can provide an `api_key` keyword argument,
4241
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
43-
to add `PUBLIC_SDK_API_KEY="My API Key"` to your `.env` file
42+
to add `CHANNEL3_API_KEY="My API Key"` to your `.env` file
4443
so that your API Key is not stored in source control.
4544

4645
## Async usage
4746

48-
Simply import `AsyncPublicSDK` instead of `PublicSDK` and use `await` with each API call:
47+
Simply import `AsyncChannel3` instead of `Channel3` and use `await` with each API call:
4948

5049
```python
5150
import os
5251
import asyncio
53-
from public_sdk import AsyncPublicSDK
52+
from channel3_sdk import AsyncChannel3
5453

55-
client = AsyncPublicSDK(
56-
api_key=os.environ.get("PUBLIC_SDK_API_KEY"), # This is the default and can be omitted
54+
client = AsyncChannel3(
55+
api_key=os.environ.get("CHANNEL3_API_KEY"), # This is the default and can be omitted
56+
# defaults to "production".
57+
environment="development",
5758
)
5859

5960

@@ -73,20 +74,20 @@ By default, the async client uses `httpx` for HTTP requests. However, for improv
7374
You can enable this by installing `aiohttp`:
7475

7576
```sh
76-
# install from the production repo
77-
pip install 'public_sdk[aiohttp] @ git+ssh://[email protected]/channel3-ai/sdk-python.git'
77+
# install from PyPI
78+
pip install channel3_sdk[aiohttp]
7879
```
7980

8081
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
8182

8283
```python
8384
import asyncio
84-
from public_sdk import DefaultAioHttpClient
85-
from public_sdk import AsyncPublicSDK
85+
from channel3_sdk import DefaultAioHttpClient
86+
from channel3_sdk import AsyncChannel3
8687

8788

8889
async def main() -> None:
89-
async with AsyncPublicSDK(
90+
async with AsyncChannel3(
9091
api_key="My API Key",
9192
http_client=DefaultAioHttpClient(),
9293
) as client:
@@ -110,9 +111,9 @@ Typed requests and responses provide autocomplete and documentation within your
110111
Nested parameters are dictionaries, typed using `TypedDict`, for example:
111112

112113
```python
113-
from public_sdk import PublicSDK
114+
from channel3_sdk import Channel3
114115

115-
client = PublicSDK()
116+
client = Channel3()
116117

117118
response = client.search.perform(
118119
config={},
@@ -122,27 +123,27 @@ print(response.config)
122123

123124
## Handling errors
124125

125-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `public_sdk.APIConnectionError` is raised.
126+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `channel3_sdk.APIConnectionError` is raised.
126127

127128
When the API returns a non-success status code (that is, 4xx or 5xx
128-
response), a subclass of `public_sdk.APIStatusError` is raised, containing `status_code` and `response` properties.
129+
response), a subclass of `channel3_sdk.APIStatusError` is raised, containing `status_code` and `response` properties.
129130

130-
All errors inherit from `public_sdk.APIError`.
131+
All errors inherit from `channel3_sdk.APIError`.
131132

132133
```python
133-
import public_sdk
134-
from public_sdk import PublicSDK
134+
import channel3_sdk
135+
from channel3_sdk import Channel3
135136

136-
client = PublicSDK()
137+
client = Channel3()
137138

138139
try:
139140
client.search.perform()
140-
except public_sdk.APIConnectionError as e:
141+
except channel3_sdk.APIConnectionError as e:
141142
print("The server could not be reached")
142143
print(e.__cause__) # an underlying Exception, likely raised within httpx.
143-
except public_sdk.RateLimitError as e:
144+
except channel3_sdk.RateLimitError as e:
144145
print("A 429 status code was received; we should back off a bit.")
145-
except public_sdk.APIStatusError as e:
146+
except channel3_sdk.APIStatusError as e:
146147
print("Another non-200-range status code was received")
147148
print(e.status_code)
148149
print(e.response)
@@ -170,10 +171,10 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
170171
You can use the `max_retries` option to configure or disable retry settings:
171172

172173
```python
173-
from public_sdk import PublicSDK
174+
from channel3_sdk import Channel3
174175

175176
# Configure the default for all requests:
176-
client = PublicSDK(
177+
client = Channel3(
177178
# default is 2
178179
max_retries=0,
179180
)
@@ -188,16 +189,16 @@ By default requests time out after 1 minute. You can configure this with a `time
188189
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
189190

190191
```python
191-
from public_sdk import PublicSDK
192+
from channel3_sdk import Channel3
192193

193194
# Configure the default for all requests:
194-
client = PublicSDK(
195+
client = Channel3(
195196
# 20 seconds (default is 1 minute)
196197
timeout=20.0,
197198
)
198199

199200
# More granular control:
200-
client = PublicSDK(
201+
client = Channel3(
201202
timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
202203
)
203204

@@ -215,10 +216,10 @@ Note that requests that time out are [retried twice by default](#retries).
215216

216217
We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.
217218

218-
You can enable logging by setting the environment variable `PUBLIC_SDK_LOG` to `info`.
219+
You can enable logging by setting the environment variable `CHANNEL3_LOG` to `info`.
219220

220221
```shell
221-
$ export PUBLIC_SDK_LOG=info
222+
$ export CHANNEL3_LOG=info
222223
```
223224

224225
Or to `debug` for more verbose logging.
@@ -240,19 +241,19 @@ if response.my_field is None:
240241
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
241242

242243
```py
243-
from public_sdk import PublicSDK
244+
from channel3_sdk import Channel3
244245

245-
client = PublicSDK()
246+
client = Channel3()
246247
response = client.search.with_raw_response.perform()
247248
print(response.headers.get('X-My-Header'))
248249

249250
search = response.parse() # get the object that `search.perform()` would have returned
250251
print(search)
251252
```
252253

253-
These methods return an [`APIResponse`](https://github.com/channel3-ai/sdk-python/tree/main/src/public_sdk/_response.py) object.
254+
These methods return an [`APIResponse`](https://github.com/channel3-ai/sdk-python/tree/main/src/channel3_sdk/_response.py) object.
254255

255-
The async client returns an [`AsyncAPIResponse`](https://github.com/channel3-ai/sdk-python/tree/main/src/public_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
256+
The async client returns an [`AsyncAPIResponse`](https://github.com/channel3-ai/sdk-python/tree/main/src/channel3_sdk/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
256257

257258
#### `.with_streaming_response`
258259

@@ -314,10 +315,10 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
314315

315316
```python
316317
import httpx
317-
from public_sdk import PublicSDK, DefaultHttpxClient
318+
from channel3_sdk import Channel3, DefaultHttpxClient
318319

319-
client = PublicSDK(
320-
# Or use the `PUBLIC_SDK_BASE_URL` env var
320+
client = Channel3(
321+
# Or use the `CHANNEL3_BASE_URL` env var
321322
base_url="http://my.test.server.example.com:8083",
322323
http_client=DefaultHttpxClient(
323324
proxy="http://my.test.proxy.example.com",
@@ -337,9 +338,9 @@ client.with_options(http_client=DefaultHttpxClient(...))
337338
By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
338339

339340
```py
340-
from public_sdk import PublicSDK
341+
from channel3_sdk import Channel3
341342

342-
with PublicSDK() as client:
343+
with Channel3() as client:
343344
# make requests here
344345
...
345346

@@ -365,8 +366,8 @@ If you've upgraded to the latest version but aren't seeing any new features you
365366
You can determine the version that is being used at runtime with:
366367

367368
```py
368-
import public_sdk
369-
print(public_sdk.__version__)
369+
import channel3_sdk
370+
print(channel3_sdk.__version__)
370371
```
371372

372373
## Requirements

SECURITY.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Public SDK, please follow the respective company's security reporting guidelines.
19+
or products provided by Channel3, please follow the respective company's security reporting guidelines.
20+
21+
### Channel3 Terms and Policies
22+
23+
Please contact [email protected] for any questions or concerns regarding the security of our services.
2024

2125
---
2226

api.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
# PublicSDK
1+
# Channel3
22

33
Methods:
44

5-
- <code title="get /">client.<a href="./src/public_sdk/_client.py">retrieve</a>() -> object</code>
5+
- <code title="get /">client.<a href="./src/channel3_sdk/_client.py">retrieve</a>() -> object</code>
66

77
# Search
88

99
Types:
1010

1111
```python
12-
from public_sdk.types import SearchPerformResponse
12+
from channel3_sdk.types import SearchPerformResponse
1313
```
1414

1515
Methods:
1616

17-
- <code title="post /v0/search">client.search.<a href="./src/public_sdk/resources/search.py">perform</a>(\*\*<a href="src/public_sdk/types/search_perform_params.py">params</a>) -> <a href="./src/public_sdk/types/search_perform_response.py">SearchPerformResponse</a></code>
17+
- <code title="post /v0/search">client.search.<a href="./src/channel3_sdk/resources/search.py">perform</a>(\*\*<a href="src/channel3_sdk/types/search_perform_params.py">params</a>) -> <a href="./src/channel3_sdk/types/search_perform_response.py">SearchPerformResponse</a></code>
1818

1919
# Products
2020

2121
Types:
2222

2323
```python
24-
from public_sdk.types import AvailabilityStatus, Price, Variant, ProductRetrieveResponse
24+
from channel3_sdk.types import AvailabilityStatus, Price, Variant, ProductRetrieveResponse
2525
```
2626

2727
Methods:
2828

29-
- <code title="get /v0/products/{product_id}">client.products.<a href="./src/public_sdk/resources/products.py">retrieve</a>(product_id) -> <a href="./src/public_sdk/types/product_retrieve_response.py">ProductRetrieveResponse</a></code>
29+
- <code title="get /v0/products/{product_id}">client.products.<a href="./src/channel3_sdk/resources/products.py">retrieve</a>(product_id) -> <a href="./src/channel3_sdk/types/product_retrieve_response.py">ProductRetrieveResponse</a></code>
3030

3131
# Brands
3232

3333
Types:
3434

3535
```python
36-
from public_sdk.types import Brand, BrandListResponse
36+
from channel3_sdk.types import Brand, BrandListResponse
3737
```
3838

3939
Methods:
4040

41-
- <code title="get /v0/brands/{brand_id}">client.brands.<a href="./src/public_sdk/resources/brands.py">retrieve</a>(brand_id) -> <a href="./src/public_sdk/types/brand.py">Brand</a></code>
42-
- <code title="get /v0/brands">client.brands.<a href="./src/public_sdk/resources/brands.py">list</a>(\*\*<a href="src/public_sdk/types/brand_list_params.py">params</a>) -> <a href="./src/public_sdk/types/brand_list_response.py">BrandListResponse</a></code>
41+
- <code title="get /v0/brands/{brand_id}">client.brands.<a href="./src/channel3_sdk/resources/brands.py">retrieve</a>(brand_id) -> <a href="./src/channel3_sdk/types/brand.py">Brand</a></code>
42+
- <code title="get /v0/brands">client.brands.<a href="./src/channel3_sdk/resources/brands.py">list</a>(\*\*<a href="src/channel3_sdk/types/brand_list_params.py">params</a>) -> <a href="./src/channel3_sdk/types/brand_list_response.py">BrandListResponse</a></code>
4343

4444
# Enrich
4545

4646
Types:
4747

4848
```python
49-
from public_sdk.types import EnrichEnrichURLResponse
49+
from channel3_sdk.types import EnrichEnrichURLResponse
5050
```
5151

5252
Methods:
5353

54-
- <code title="post /v0/enrich">client.enrich.<a href="./src/public_sdk/resources/enrich.py">enrich_url</a>(\*\*<a href="src/public_sdk/types/enrich_enrich_url_params.py">params</a>) -> <a href="./src/public_sdk/types/enrich_enrich_url_response.py">EnrichEnrichURLResponse</a></code>
54+
- <code title="post /v0/enrich">client.enrich.<a href="./src/channel3_sdk/resources/enrich.py">enrich_url</a>(\*\*<a href="src/channel3_sdk/types/enrich_enrich_url_params.py">params</a>) -> <a href="./src/channel3_sdk/types/enrich_enrich_url_response.py">EnrichEnrichURLResponse</a></code>

0 commit comments

Comments
 (0)