Skip to content

Commit 8ca8600

Browse files
authored
docs: update readme and upgrading guide for v2 beta (#90)
* docs: update readme and upgrading guide for v2 beta * docs: fix typos in UPGRADING.md - Remove trailing spaces from heading - Fix redundant phrase "Use pip to install...using pip" - Fix incorrect repository references (replicate-python-stainless -> replicate-python-beta)
1 parent 6146b12 commit 8ca8600

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
# Replicate Python API SDK
1+
# Replicate Python API SDK (beta)
22

3-
<!-- prettier-ignore -->
4-
[![PyPI version](https://img.shields.io/pypi/v/replicate.svg?label=pypi%20(stable))](https://pypi.org/project/replicate/)
3+
This is the repo for Replicate's official v2 Python SDK, which provides access to Replicate's HTTP API from any Python 3.8+ application.
54

6-
This is the repo for Replicate's official v2 Python SDK, which provides access to Replicate's HTTP API from any Python 3.8+
7-
application.
5+
⚠️ The v2 SDK is currently in public beta. Check out the [release notes](https://github.com/replicate/replicate-python-beta/releases/tag/v2.0.0-beta.1) and leave feedback on the [GitHub discussion](https://github.com/replicate/replicate-python-beta/discussions/89).
86

9-
## Docs
7+
🤔 Looking for the legacy v1 Python client? Find it [here](https://github.com/replicate/replicate-python).
108

11-
- https://sdks.replicate.com/python
12-
- https://replicate.com/docs/reference/http
9+
## Docs
1310

11+
- v2 beta release notes: https://github.com/replicate/replicate-python-beta/releases/tag/v2.0.0-beta.1
12+
- v2 beta migration guide: https://github.com/replicate/replicate-python-beta/blob/main/UPGRADING.md
13+
- v2 beta SDK reference: https://sdks.replicate.com/python
14+
- v2 beta GitHub discussion: https://github.com/replicate/replicate-python-beta/discussions/89
15+
- HTTP API reference: https://replicate.com/docs/reference/http
1416

1517
## Installation
1618

17-
The [`replicate`](https://pypi.org/project/replicate/) package is available on PyPI. Install it with [pip](https://pip.pypa.io/en/stable/):
19+
The [`replicate`](https://pypi.org/project/replicate/) package is available on PyPI. Install it with [pip](https://pip.pypa.io/en/stable/) (using the `--pre` flag to get the latest beta version):
1820

1921
```sh
2022
pip install --pre replicate

UPGRADING.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# Upgrading from v1 to v2
22

3-
This guide will help you migrate an existing codebase from the v1 Replicate Python SDK to v2. The v2 SDK is a complete rewrite built in partnership with [Stainless](https://www.stainless.com/customers/replicate), the company that helps design and maintain SDKs for companies like OpenAI, Anthropic, and Cloudflare. The v2 SDK is largely autogenerated from Replicate's OpenAPI specification, providing better type safety, more consistent error handling, and improved async support. Check out the [v2 release notes](https://github.com/replicate/replicate-python-stainless/releases) for more details.
3+
This guide will help you migrate an existing codebase from the v1 Replicate Python SDK to v2.
44

5-
✋ If you are working on a new project, you don't need to read this document.
5+
🍪 Feed this doc to your coding agent to assist with the upgrade process!
66

7-
This doc is intended for both humans and agents. 🧑🏽‍🦰 🤝 🤖
7+
If you encounter any issues, please [share feedback on the GitHub Discussions page](https://github.com/replicate/replicate-python-beta/discussions/89).
88

9-
## Installing the v2 SDK
9+
## Docs
1010

11-
Use pip to install the latest pre-release version of the v2 SDK:
11+
- v2 beta release notes: https://github.com/replicate/replicate-python-beta/releases/tag/v2.0.0-beta.1
12+
- v2 beta SDK reference: https://sdks.replicate.com/python
13+
- v2 beta GitHub discussion: https://github.com/replicate/replicate-python-beta/discussions/89
14+
- HTTP API reference: https://replicate.com/docs/reference/http
15+
16+
## Installing the v2 SDK
17+
18+
Install the latest pre-release version of the v2 SDK from PyPI using pip:
1219

1320
```sh
1421
pip install --pre replicate
@@ -605,7 +612,7 @@ print(response.http_response.status_code)
605612
prediction = response.parse()
606613
```
607614

608-
The response object is an [`APIResponse`](https://github.com/replicate/replicate-python-stainless/tree/main/src/replicate/_response.py) instance. See the [README](https://github.com/replicate/replicate-python-stainless#accessing-raw-response-data-eg-headers) for full documentation.
615+
The response object is an [`APIResponse`](https://github.com/replicate/replicate-python-beta/tree/main/src/replicate/_response.py) instance. See the [README](https://github.com/replicate/replicate-python-beta#accessing-raw-response-data-eg-headers) for full documentation.
609616

610617
### Streaming response wrapper
611618

@@ -631,7 +638,4 @@ The following features are not available in v2:
631638

632639
## Getting help
633640

634-
If you encounter issues during the migration process:
635-
636-
- Check the [API documentation](https://replicate.com/docs/reference/http)
637-
- Open an issue on [GitHub](https://github.com/replicate/replicate-python-stainless/issues)
641+
If you encounter issues during the migration process, share your feedback on the [GitHub Discussions page](https://github.com/replicate/replicate-python-beta/discussions/89).

0 commit comments

Comments
 (0)