diff --git a/README.md b/README.md index 4f344d8..0744009 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,22 @@ -# Replicate Python API SDK +# Replicate Python API SDK (beta) - -[)](https://pypi.org/project/replicate/) +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. -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. +β οΈ 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). -## Docs +π€ Looking for the legacy v1 Python client? Find it [here](https://github.com/replicate/replicate-python). -- https://sdks.replicate.com/python -- https://replicate.com/docs/reference/http +## Docs +- v2 beta release notes: https://github.com/replicate/replicate-python-beta/releases/tag/v2.0.0-beta.1 +- v2 beta migration guide: https://github.com/replicate/replicate-python-beta/blob/main/UPGRADING.md +- v2 beta SDK reference: https://sdks.replicate.com/python +- v2 beta GitHub discussion: https://github.com/replicate/replicate-python-beta/discussions/89 +- HTTP API reference: https://replicate.com/docs/reference/http ## Installation -The [`replicate`](https://pypi.org/project/replicate/) package is available on PyPI. Install it with [pip](https://pip.pypa.io/en/stable/): +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): ```sh pip install --pre replicate diff --git a/UPGRADING.md b/UPGRADING.md index 8a3f48d..4d30371 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -1,14 +1,21 @@ # Upgrading from v1 to v2 -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. +This guide will help you migrate an existing codebase from the v1 Replicate Python SDK to v2. -β If you are working on a new project, you don't need to read this document. +πͺ Feed this doc to your coding agent to assist with the upgrade process! -This doc is intended for both humans and agents. π§π½βπ¦° π€ π€ +If you encounter any issues, please [share feedback on the GitHub Discussions page](https://github.com/replicate/replicate-python-beta/discussions/89). -## Installing the v2 SDK +## Docs -Use pip to install the latest pre-release version of the v2 SDK: +- v2 beta release notes: https://github.com/replicate/replicate-python-beta/releases/tag/v2.0.0-beta.1 +- v2 beta SDK reference: https://sdks.replicate.com/python +- v2 beta GitHub discussion: https://github.com/replicate/replicate-python-beta/discussions/89 +- HTTP API reference: https://replicate.com/docs/reference/http + +## Installing the v2 SDK + +Install the latest pre-release version of the v2 SDK from PyPI using pip: ```sh pip install --pre replicate @@ -605,7 +612,7 @@ print(response.http_response.status_code) prediction = response.parse() ``` -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. +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. ### Streaming response wrapper @@ -631,7 +638,4 @@ The following features are not available in v2: ## Getting help -If you encounter issues during the migration process: - -- Check the [API documentation](https://replicate.com/docs/reference/http) -- Open an issue on [GitHub](https://github.com/replicate/replicate-python-stainless/issues) \ No newline at end of file +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). \ No newline at end of file