Skip to content

Commit 8d32079

Browse files
authored
Merge pull request #13 from replicate/release-please--branches--main--changes--next
release: 0.1.0-alpha.9
2 parents 7dc2438 + 8665dd2 commit 8d32079

36 files changed

+824
-557
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.REPLICATE_CLIENT_PYPI_TOKEN || secrets.PYPI_TOKEN }}
31+
PYPI_TOKEN: ${{ secrets.REPLICATE_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.REPLICATE_CLIENT_PYPI_TOKEN || secrets.PYPI_TOKEN }}
21+
PYPI_TOKEN: ${{ secrets.REPLICATE_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.1.0-alpha.8"
2+
".": "0.1.0-alpha.9"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 30
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/replicate%2Freplicate-client-0d7d82bff8a18b03e0cd1cbf8609c3026bb07db851bc6f9166032045a9925eea.yml
33
openapi_spec_hash: 8ce211dfa6fece24b1413e91ba55210a
4-
config_hash: 2e6a171ce57a4a6a8e8dcd3dd893d8cc
4+
config_hash: c784c102324b1d027c6ce40e17fe9590

CHANGELOG.md

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

3+
## 0.1.0-alpha.9 (2025-05-06)
4+
5+
Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/replicate/replicate-python-stainless/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
6+
7+
### Bug Fixes
8+
9+
* change organization.name to replicate ([04b0797](https://github.com/replicate/replicate-python-stainless/commit/04b079729cd431cad9e992c5c0a0d82ad838f5ef))
10+
11+
12+
### Chores
13+
14+
* use lazy imports for module level client ([14f6cfc](https://github.com/replicate/replicate-python-stainless/commit/14f6cfcad3045d1bde023d1896b369057d3f6b77))
15+
* use lazy imports for resources ([b2a0246](https://github.com/replicate/replicate-python-stainless/commit/b2a024612fc8b5a1bc7a15038cd33ab29e728b58))
16+
317
## 0.1.0-alpha.8 (2025-04-30)
418

519
Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/replicate/replicate-python-stainless/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)

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 Replicate Client
189+
Copyright 2025 Replicate
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: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Replicate Client Python API library
1+
# Replicate Python API library
22

33
[![PyPI version](https://img.shields.io/pypi/v/replicate-stainless.svg)](https://pypi.org/project/replicate-stainless/)
44

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

@@ -25,9 +25,9 @@ The full API of this library can be found in [api.md](api.md).
2525

2626
```python
2727
import os
28-
from replicate import ReplicateClient
28+
from replicate import Replicate
2929

30-
client = ReplicateClient(
30+
client = Replicate(
3131
bearer_token=os.environ.get("REPLICATE_API_TOKEN"), # This is the default and can be omitted
3232
)
3333

@@ -42,14 +42,14 @@ so that your Bearer Token is not stored in source control.
4242

4343
## Async usage
4444

45-
Simply import `AsyncReplicateClient` instead of `ReplicateClient` and use `await` with each API call:
45+
Simply import `AsyncReplicate` instead of `Replicate` and use `await` with each API call:
4646

4747
```python
4848
import os
4949
import asyncio
50-
from replicate import AsyncReplicateClient
50+
from replicate import AsyncReplicate
5151

52-
client = AsyncReplicateClient(
52+
client = AsyncReplicate(
5353
bearer_token=os.environ.get("REPLICATE_API_TOKEN"), # This is the default and can be omitted
5454
)
5555

@@ -75,14 +75,14 @@ Typed requests and responses provide autocomplete and documentation within your
7575

7676
## Pagination
7777

78-
List methods in the Replicate Client API are paginated.
78+
List methods in the Replicate API are paginated.
7979

8080
This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
8181

8282
```python
83-
from replicate import ReplicateClient
83+
from replicate import Replicate
8484

85-
client = ReplicateClient()
85+
client = Replicate()
8686

8787
all_predictions = []
8888
# Automatically fetches more pages as needed.
@@ -96,9 +96,9 @@ Or, asynchronously:
9696

9797
```python
9898
import asyncio
99-
from replicate import AsyncReplicateClient
99+
from replicate import AsyncReplicate
100100

101-
client = AsyncReplicateClient()
101+
client = AsyncReplicate()
102102

103103

104104
async def main() -> None:
@@ -147,9 +147,9 @@ All errors inherit from `replicate.APIError`.
147147

148148
```python
149149
import replicate
150-
from replicate import ReplicateClient
150+
from replicate import Replicate
151151

152-
client = ReplicateClient()
152+
client = Replicate()
153153

154154
try:
155155
client.account.get()
@@ -186,10 +186,10 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
186186
You can use the `max_retries` option to configure or disable retry settings:
187187

188188
```python
189-
from replicate import ReplicateClient
189+
from replicate import Replicate
190190

191191
# Configure the default for all requests:
192-
client = ReplicateClient(
192+
client = Replicate(
193193
# default is 2
194194
max_retries=0,
195195
)
@@ -204,16 +204,16 @@ By default requests time out after 1 minute. You can configure this with a `time
204204
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
205205

206206
```python
207-
from replicate import ReplicateClient
207+
from replicate import Replicate
208208

209209
# Configure the default for all requests:
210-
client = ReplicateClient(
210+
client = Replicate(
211211
# 20 seconds (default is 1 minute)
212212
timeout=20.0,
213213
)
214214

215215
# More granular control:
216-
client = ReplicateClient(
216+
client = Replicate(
217217
timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
218218
)
219219

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

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

234-
You can enable logging by setting the environment variable `REPLICATE_CLIENT_LOG` to `info`.
234+
You can enable logging by setting the environment variable `REPLICATE_LOG` to `info`.
235235

236236
```shell
237-
$ export REPLICATE_CLIENT_LOG=info
237+
$ export REPLICATE_LOG=info
238238
```
239239

240240
Or to `debug` for more verbose logging.
@@ -256,9 +256,9 @@ if response.my_field is None:
256256
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
257257

258258
```py
259-
from replicate import ReplicateClient
259+
from replicate import Replicate
260260

261-
client = ReplicateClient()
261+
client = Replicate()
262262
response = client.account.with_raw_response.get()
263263
print(response.headers.get('X-My-Header'))
264264

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

331331
```python
332332
import httpx
333-
from replicate import ReplicateClient, DefaultHttpxClient
333+
from replicate import Replicate, DefaultHttpxClient
334334

335-
client = ReplicateClient(
336-
# Or use the `REPLICATE_CLIENT_BASE_URL` env var
335+
client = Replicate(
336+
# Or use the `REPLICATE_BASE_URL` env var
337337
base_url="http://my.test.server.example.com:8083",
338338
http_client=DefaultHttpxClient(
339339
proxy="http://my.test.proxy.example.com",
@@ -353,9 +353,9 @@ client.with_options(http_client=DefaultHttpxClient(...))
353353
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.
354354

355355
```py
356-
from replicate import ReplicateClient
356+
from replicate import Replicate
357357

358-
with ReplicateClient() as client:
358+
with Replicate() as client:
359359
# make requests here
360360
...
361361

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ 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 Replicate Client please follow the respective company's security reporting guidelines.
19+
or products provided by Replicate please follow the respective company's security reporting guidelines.
2020

21-
### Replicate Client Terms and Policies
21+
### Replicate Terms and Policies
2222

2323
Please contact [email protected] for any questions or concerns regarding security of our services.
2424

bin/check-release-environment

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
errors=()
44

55
if [ -z "${PYPI_TOKEN}" ]; then
6-
errors+=("The REPLICATE_CLIENT_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
6+
errors+=("The REPLICATE_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
77
fi
88

99
lenErrors=${#errors[@]}

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
22
name = "replicate-stainless"
3-
version = "0.1.0-alpha.8"
4-
description = "The official Python library for the replicate-client API"
3+
version = "0.1.0-alpha.9"
4+
description = "The official Python library for the replicate API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
8-
{ name = "Replicate Client", email = "[email protected]" },
8+
{ name = "Replicate", email = "[email protected]" },
99
]
1010
dependencies = [
1111
"httpx>=0.23.0, <1",

0 commit comments

Comments
 (0)