diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fea3454..a8f7122 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.0.0" + ".": "1.0.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 3bdc7d9..e7f91f4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 27 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-3eaa6a0657e9f67ea196c65d3b604c71f5406108983981ec696642563fda0a93.yml openapi_spec_hash: c417a44bb9fa62a02eca68bbb307c712 -config_hash: 6d4d59b89f68ea23dddfdefeee29c973 +config_hash: 6a52f6ae7d55cf3b4e91538cc7752aeb diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a6cd2a..313b721 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 1.0.1 (2025-12-09) + +Full Changelog: [v1.0.0...v1.0.1](https://github.com/moderation-api/sdk-python/compare/v1.0.0...v1.0.1) + +### Bug Fixes + +* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([36ea40a](https://github.com/moderation-api/sdk-python/commit/36ea40ac2b242cd53c8cd915befe809b65a13215)) + + +### Chores + +* update SDK settings ([1876999](https://github.com/moderation-api/sdk-python/commit/18769999773649b22146674569e8ba3ddf88f876)) + ## 1.0.0 (2025-12-06) Full Changelog: [v0.0.1...v1.0.0](https://github.com/moderation-api/sdk-python/compare/v0.0.1...v1.0.0) diff --git a/README.md b/README.md index 41f56a6..a3d8831 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,10 @@ The REST API documentation can be found on [docs.moderationapi.com](https://docs ## Installation ```sh -# install from the production repo -pip install git+ssh://git@github.com/moderation-api/sdk-python.git +# install from PyPI +pip install moderation_api ``` -> [!NOTE] -> Once this package is [published to PyPI](https://www.stainless.com/docs/guides/publish), this will become: `pip install moderation_api` - ## Usage The full API of this library can be found in [api.md](api.md). @@ -85,8 +82,8 @@ By default, the async client uses `httpx` for HTTP requests. However, for improv You can enable this by installing `aiohttp`: ```sh -# install from the production repo -pip install 'moderation_api[aiohttp] @ git+ssh://git@github.com/moderation-api/sdk-python.git' +# install from PyPI +pip install moderation_api[aiohttp] ``` Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`: diff --git a/pyproject.toml b/pyproject.toml index a2e4300..45a79f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "moderation_api" -version = "1.0.0" +version = "1.0.1" description = "The official Python library for the moderation-api API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/moderation_api/_types.py b/src/moderation_api/_types.py index 07efc18..0838d90 100644 --- a/src/moderation_api/_types.py +++ b/src/moderation_api/_types.py @@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False): if TYPE_CHECKING: # This works because str.__contains__ does not accept object (either in typeshed or at runtime) # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + # + # Note: index() and count() methods are intentionally omitted to allow pyright to properly + # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr. class SequenceNotStr(Protocol[_T_co]): @overload def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... @@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... def __contains__(self, value: object, /) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T_co]: ... - def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... - def count(self, value: Any, /) -> int: ... def __reversed__(self) -> Iterator[_T_co]: ... else: # just point this to a normal `Sequence` at runtime to avoid having to special case diff --git a/src/moderation_api/_version.py b/src/moderation_api/_version.py index 0766c88..bd26620 100644 --- a/src/moderation_api/_version.py +++ b/src/moderation_api/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "moderation_api" -__version__ = "1.0.0" # x-release-please-version +__version__ = "1.0.1" # x-release-please-version