Skip to content

Commit fdb39b0

Browse files
authored
Merge pull request #22 from replicate/release-please--branches--main--changes--next
release: 0.3.2
2 parents 07654af + eb0ea3a commit fdb39b0

File tree

6 files changed

+39
-3
lines changed

6 files changed

+39
-3
lines changed

.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.3.1"
2+
".": "0.3.2"
33
}

CHANGELOG.md

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

3+
## 0.3.2 (2025-05-13)
4+
5+
Full Changelog: [v0.3.1...v0.3.2](https://github.com/replicate/replicate-python-stainless/compare/v0.3.1...v0.3.2)
6+
7+
### Bug Fixes
8+
9+
* **package:** support direct resource imports ([97b771a](https://github.com/replicate/replicate-python-stainless/commit/97b771a8f2f318e5907656c04ddb6b711af1d44a))
10+
311
## 0.3.1 (2025-05-09)
412

513
Full Changelog: [v0.3.0...v0.3.1](https://github.com/replicate/replicate-python-stainless/compare/v0.3.0...v0.3.1)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "replicate-stainless"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
description = "The official Python library for the replicate API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/replicate/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import typing as _t
56
from typing_extensions import override
67

78
from . import types
@@ -89,6 +90,9 @@
8990
"ModelVersionIdentifier",
9091
]
9192

93+
if not _t.TYPE_CHECKING:
94+
from ._utils._resources_proxy import resources as resources
95+
9296
_setup_logging()
9397

9498
# Update the __module__ attribute for exported symbols so that
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from __future__ import annotations
2+
3+
from typing import Any
4+
from typing_extensions import override
5+
6+
from ._proxy import LazyProxy
7+
8+
9+
class ResourcesProxy(LazyProxy[Any]):
10+
"""A proxy for the `replicate.resources` module.
11+
12+
This is used so that we can lazily import `replicate.resources` only when
13+
needed *and* so that users can just import `replicate` and reference `replicate.resources`
14+
"""
15+
16+
@override
17+
def __load__(self) -> Any:
18+
import importlib
19+
20+
mod = importlib.import_module("replicate.resources")
21+
return mod
22+
23+
24+
resources = ResourcesProxy().__as_proxied__()

src/replicate/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "replicate"
4-
__version__ = "0.3.1" # x-release-please-version
4+
__version__ = "0.3.2" # x-release-please-version

0 commit comments

Comments
 (0)