Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.9.0"
".": "1.9.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 27
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/moderation-api%2Fmoderation-api-67a3fe4439c3aa74fb2c18b207b43c790d42bab7bfd7e5e16f3e1046765ec959.yml
openapi_spec_hash: c87b33c2c72a172da02ed75d4e79eb70
config_hash: 6a52f6ae7d55cf3b4e91538cc7752aeb
config_hash: 6b825a08e19dfb747c5dc1766502b789
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.9.1 (2026-02-20)

Full Changelog: [v1.9.0...v1.9.1](https://github.com/moderation-api/sdk-python/compare/v1.9.0...v1.9.1)

### Chores

* update mock server docs ([1967778](https://github.com/moderation-api/sdk-python/commit/1967778c317634f98c29d59b547fd530d347340d))

## 1.9.0 (2026-02-20)

Full Changelog: [v1.8.0...v1.9.0](https://github.com/moderation-api/sdk-python/compare/v1.8.0...v1.9.0)
Expand Down
7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ $ pip install ./path-to-wheel-file.whl

## Running tests

Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```sh
# you will need npm installed
$ npx prism mock path/to/your/openapi.yml
```

```sh
$ ./scripts/test
```
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "moderation_api"
version = "1.9.0"
version = "1.9.1"
description = "The official Python library for the moderation-api API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/moderation_api/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "moderation_api"
__version__ = "1.9.0" # x-release-please-version
__version__ = "1.9.1" # x-release-please-version
36 changes: 18 additions & 18 deletions tests/api_resources/actions/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
class TestExecute:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_execute(self, client: ModerationAPI) -> None:
execute = client.actions.execute.execute(
action_key="actionKey",
)
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_execute_with_all_params(self, client: ModerationAPI) -> None:
execute = client.actions.execute.execute(
Expand All @@ -43,7 +43,7 @@ def test_method_execute_with_all_params(self, client: ModerationAPI) -> None:
)
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_execute(self, client: ModerationAPI) -> None:
response = client.actions.execute.with_raw_response.execute(
Expand All @@ -55,7 +55,7 @@ def test_raw_response_execute(self, client: ModerationAPI) -> None:
execute = response.parse()
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_execute(self, client: ModerationAPI) -> None:
with client.actions.execute.with_streaming_response.execute(
Expand All @@ -69,7 +69,7 @@ def test_streaming_response_execute(self, client: ModerationAPI) -> None:

assert cast(Any, response.is_closed) is True

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_execute_by_id(self, client: ModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand All @@ -79,7 +79,7 @@ def test_method_execute_by_id(self, client: ModerationAPI) -> None:

assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_execute_by_id_with_all_params(self, client: ModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand All @@ -93,7 +93,7 @@ def test_method_execute_by_id_with_all_params(self, client: ModerationAPI) -> No

assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_execute_by_id(self, client: ModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand All @@ -106,7 +106,7 @@ def test_raw_response_execute_by_id(self, client: ModerationAPI) -> None:
execute = response.parse()
assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_execute_by_id(self, client: ModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand All @@ -121,7 +121,7 @@ def test_streaming_response_execute_by_id(self, client: ModerationAPI) -> None:

assert cast(Any, response.is_closed) is True

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_execute_by_id(self, client: ModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand All @@ -136,15 +136,15 @@ class TestAsyncExecute:
"async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
)

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_execute(self, async_client: AsyncModerationAPI) -> None:
execute = await async_client.actions.execute.execute(
action_key="actionKey",
)
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_execute_with_all_params(self, async_client: AsyncModerationAPI) -> None:
execute = await async_client.actions.execute.execute(
Expand All @@ -157,7 +157,7 @@ async def test_method_execute_with_all_params(self, async_client: AsyncModeratio
)
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_execute(self, async_client: AsyncModerationAPI) -> None:
response = await async_client.actions.execute.with_raw_response.execute(
Expand All @@ -169,7 +169,7 @@ async def test_raw_response_execute(self, async_client: AsyncModerationAPI) -> N
execute = await response.parse()
assert_matches_type(ExecuteExecuteResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_execute(self, async_client: AsyncModerationAPI) -> None:
async with async_client.actions.execute.with_streaming_response.execute(
Expand All @@ -183,7 +183,7 @@ async def test_streaming_response_execute(self, async_client: AsyncModerationAPI

assert cast(Any, response.is_closed) is True

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_execute_by_id(self, async_client: AsyncModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand All @@ -193,7 +193,7 @@ async def test_method_execute_by_id(self, async_client: AsyncModerationAPI) -> N

assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_execute_by_id_with_all_params(self, async_client: AsyncModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand All @@ -207,7 +207,7 @@ async def test_method_execute_by_id_with_all_params(self, async_client: AsyncMod

assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_execute_by_id(self, async_client: AsyncModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand All @@ -220,7 +220,7 @@ async def test_raw_response_execute_by_id(self, async_client: AsyncModerationAPI
execute = await response.parse()
assert_matches_type(ExecuteExecuteByIDResponse, execute, path=["response"])

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_execute_by_id(self, async_client: AsyncModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand All @@ -235,7 +235,7 @@ async def test_streaming_response_execute_by_id(self, async_client: AsyncModerat

assert cast(Any, response.is_closed) is True

@pytest.mark.skip(reason="Prism tests are disabled")
@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_execute_by_id(self, async_client: AsyncModerationAPI) -> None:
with pytest.warns(DeprecationWarning):
Expand Down
Loading