Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2c1457d
chore(internal): bump dependencies
stainless-app[bot] Feb 10, 2026
58f8a6e
chore(internal): fix lint error on Python 3.14
stainless-app[bot] Feb 12, 2026
1354ff8
feat(api): remove brand field from ElementalContent
stainless-app[bot] Feb 12, 2026
0b4aca7
chore: format all `api.md` files
stainless-app[bot] Feb 13, 2026
31b4e07
chore(internal): remove mock server code
stainless-app[bot] Feb 20, 2026
f18d539
chore: update mock server docs
stainless-app[bot] Feb 20, 2026
bba6243
codegen metadata
stainless-app[bot] Feb 20, 2026
7f342f9
chore(internal): add request options to SSE classes
stainless-app[bot] Feb 24, 2026
d82fd8d
chore(internal): make `test_proxy_environment_variables` more resilient
stainless-app[bot] Feb 24, 2026
8aaf597
chore(internal): make `test_proxy_environment_variables` more resilie…
stainless-app[bot] Feb 25, 2026
0fe1942
codegen metadata
stainless-app[bot] Feb 27, 2026
77a903c
codegen metadata
stainless-app[bot] Mar 2, 2026
d66db4b
codegen metadata
stainless-app[bot] Mar 3, 2026
3ee45a8
fix(api): remove body_token, rename path_token in users.tokens.add_si…
stainless-app[bot] Mar 3, 2026
e69f274
refactor(types): use `extra_items` from PEP 728
stainless-app[bot] Mar 6, 2026
8d5a384
chore(ci): skip uploading artifacts on stainless-internal branches
stainless-app[bot] Mar 7, 2026
be92a16
feat(api): add journeys resource with list and invoke methods
stainless-app[bot] Mar 11, 2026
a86abbf
fix: mark MessageDetails timestamp fields as optional
stainless-app[bot] Mar 12, 2026
518021f
codegen metadata
stainless-app[bot] Mar 12, 2026
7915a17
release: 7.9.0
stainless-app[bot] Mar 12, 2026
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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,18 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/courier-python'
if: |-
github.repository == 'stainless-sdks/courier-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/courier-python'
if: |-
github.repository == 'stainless-sdks/courier-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "7.8.0"
".": "7.9.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 81
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-3fc1c86b4a83a16393aaf17d1fb3ac6098d30dd057ba872973b57285a7a3f0d0.yml
openapi_spec_hash: 02a545d217b13399f311e99561f9de1d
config_hash: 0789c3cddc625bb9712b3bded274ab6c
configured_endpoints: 83
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-19330fca8fa9bbae835ec9d9f83b37b3df364d9b462090b9623bfc9b6eae99c2.yml
openapi_spec_hash: 0bc6889464c9ac2542b4837f569c1837
config_hash: 1ae49ed522c8423378d9463cdd0fb880
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Changelog

## 7.9.0 (2026-03-12)

Full Changelog: [v7.8.0...v7.9.0](https://github.com/trycourier/courier-python/compare/v7.8.0...v7.9.0)

### Features

* **api:** add journeys resource with list and invoke methods ([be92a16](https://github.com/trycourier/courier-python/commit/be92a168addb8487d27fa6d34e04208ed2476d45))
* **api:** remove brand field from ElementalContent ([1354ff8](https://github.com/trycourier/courier-python/commit/1354ff8604b5732982ab3a36e3ed856070473ba5))


### Bug Fixes

* **api:** remove body_token, rename path_token in users.tokens.add_single ([3ee45a8](https://github.com/trycourier/courier-python/commit/3ee45a8171b58edeb0eaec4be7f7cb689abf0bfe))
* mark MessageDetails timestamp fields as optional ([a86abbf](https://github.com/trycourier/courier-python/commit/a86abbf019dcfa29817a60db6b166dcbe5d48faa))


### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([8d5a384](https://github.com/trycourier/courier-python/commit/8d5a38409419c90d4197f5fcc089135f15c5e16b))
* format all `api.md` files ([0b4aca7](https://github.com/trycourier/courier-python/commit/0b4aca79b5d4c568aa262978040f57a2ba540f6f))
* **internal:** add request options to SSE classes ([7f342f9](https://github.com/trycourier/courier-python/commit/7f342f99eb625e3091aa1c0fb794fac4d6aec20c))
* **internal:** bump dependencies ([2c1457d](https://github.com/trycourier/courier-python/commit/2c1457d5017fc4093501861ca2cf99e5112ddeed))
* **internal:** fix lint error on Python 3.14 ([58f8a6e](https://github.com/trycourier/courier-python/commit/58f8a6e0f5ed3370ef13741188be2691be0aa73f))
* **internal:** make `test_proxy_environment_variables` more resilient ([d82fd8d](https://github.com/trycourier/courier-python/commit/d82fd8d691c3944903526f5e2d78043f9b8c76dd))
* **internal:** make `test_proxy_environment_variables` more resilient to env ([8aaf597](https://github.com/trycourier/courier-python/commit/8aaf597d7635aa5137092f1c5579ccffd3868a2e))
* **internal:** remove mock server code ([31b4e07](https://github.com/trycourier/courier-python/commit/31b4e07803c62389646e9037ca1056508525c075))
* update mock server docs ([f18d539](https://github.com/trycourier/courier-python/commit/f18d539df79d21c9e4484bfdc865dd68523e1920))


### Documentation

* add AUTO-GENERATED-OVERVIEW markers for README sync ([#126](https://github.com/trycourier/courier-python/issues/126)) ([69391e1](https://github.com/trycourier/courier-python/commit/69391e1455bfd27cc6eb8bdce8f28551c6efce85))
* sync README from mintlify-docs (2026-02-20 18:11 UTC) ([#127](https://github.com/trycourier/courier-python/issues/127)) ([e3757cc](https://github.com/trycourier/courier-python/commit/e3757cc4a457623795cc8e7aa99a6079ad5c001d))


### Refactors

* **types:** use `extra_items` from PEP 728 ([e69f274](https://github.com/trycourier/courier-python/commit/e69f274a31bb179e242b89851468c234f5bbfa2f))

## 7.8.0 (2026-02-06)

Full Changelog: [v7.7.1...v7.8.0](https://github.com/trycourier/courier-python/compare/v7.7.1...v7.8.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
20 changes: 19 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,24 @@ Methods:
- <code title="post /automations/invoke">client.automations.invoke.<a href="./src/courier/resources/automations/invoke.py">invoke_ad_hoc</a>(\*\*<a href="src/courier/types/automations/invoke_invoke_ad_hoc_params.py">params</a>) -> <a href="./src/courier/types/automation_invoke_response.py">AutomationInvokeResponse</a></code>
- <code title="post /automations/{templateId}/invoke">client.automations.invoke.<a href="./src/courier/resources/automations/invoke.py">invoke_by_template</a>(template_id, \*\*<a href="src/courier/types/automations/invoke_invoke_by_template_params.py">params</a>) -> <a href="./src/courier/types/automation_invoke_response.py">AutomationInvokeResponse</a></code>

# Journeys

Types:

```python
from courier.types import (
Journey,
JourneysInvokeRequest,
JourneysInvokeResponse,
JourneysListResponse,
)
```

Methods:

- <code title="get /journeys">client.journeys.<a href="./src/courier/resources/journeys.py">list</a>(\*\*<a href="src/courier/types/journey_list_params.py">params</a>) -> <a href="./src/courier/types/journeys_list_response.py">JourneysListResponse</a></code>
- <code title="post /journeys/{templateId}/invoke">client.journeys.<a href="./src/courier/resources/journeys.py">invoke</a>(template_id, \*\*<a href="src/courier/types/journey_invoke_params.py">params</a>) -> <a href="./src/courier/types/journeys_invoke_response.py">JourneysInvokeResponse</a></code>

# Brands

Types:
Expand Down Expand Up @@ -473,4 +491,4 @@ Methods:
- <code title="get /users/{user_id}/tokens">client.users.tokens.<a href="./src/courier/resources/users/tokens.py">list</a>(user_id) -> <a href="./src/courier/types/users/token_list_response.py">TokenListResponse</a></code>
- <code title="delete /users/{user_id}/tokens/{token}">client.users.tokens.<a href="./src/courier/resources/users/tokens.py">delete</a>(token, \*, user_id) -> None</code>
- <code title="put /users/{user_id}/tokens">client.users.tokens.<a href="./src/courier/resources/users/tokens.py">add_multiple</a>(user_id) -> None</code>
- <code title="put /users/{user_id}/tokens/{token}">client.users.tokens.<a href="./src/courier/resources/users/tokens.py">add_single</a>(path_token, \*, user_id, \*\*<a href="src/courier/types/users/token_add_single_params.py">params</a>) -> None</code>
- <code title="put /users/{user_id}/tokens/{token}">client.users.tokens.<a href="./src/courier/resources/users/tokens.py">add_single</a>(token, \*, user_id, \*\*<a href="src/courier/types/users/token_add_single_params.py">params</a>) -> None</code>
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "trycourier"
version = "7.8.0"
version = "7.9.0"
description = "The official Python library for the Courier API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -69,7 +69,7 @@ format = { chain = [
# run formatting again to fix any inconsistencies when imports are stripped
"format:ruff",
]}
"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'"
"format:ruff" = "ruff format"

"lint" = { chain = [
Expand Down
20 changes: 10 additions & 10 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.13.2
aiohttp==3.13.3
# via httpx-aiohttp
# via trycourier
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
anyio==4.12.0
anyio==4.12.1
# via httpx
# via trycourier
argcomplete==3.6.3
Expand All @@ -31,7 +31,7 @@ attrs==25.4.0
# via nox
backports-asyncio-runner==1.2.0
# via pytest-asyncio
certifi==2025.11.12
certifi==2026.1.4
# via httpcore
# via httpx
colorlog==6.10.1
Expand Down Expand Up @@ -61,15 +61,15 @@ httpx==0.28.1
# via httpx-aiohttp
# via respx
# via trycourier
httpx-aiohttp==0.1.9
httpx-aiohttp==0.1.12
# via trycourier
humanize==4.13.0
# via nox
idna==3.11
# via anyio
# via httpx
# via yarl
importlib-metadata==8.7.0
importlib-metadata==8.7.1
iniconfig==2.1.0
# via pytest
markdown-it-py==3.0.0
Expand All @@ -82,14 +82,14 @@ multidict==6.7.0
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
nodeenv==1.9.1
nodeenv==1.10.0
# via pyright
nox==2025.11.12
packaging==25.0
# via dependency-groups
# via nox
# via pytest
pathspec==0.12.1
pathspec==1.0.3
# via mypy
platformdirs==4.4.0
# via virtualenv
Expand All @@ -115,13 +115,13 @@ python-dateutil==2.9.0.post0
# via time-machine
respx==0.22.0
rich==14.2.0
ruff==0.14.7
ruff==0.14.13
six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via trycourier
time-machine==2.19.0
tomli==2.3.0
tomli==2.4.0
# via dependency-groups
# via mypy
# via nox
Expand All @@ -141,7 +141,7 @@ typing-extensions==4.15.0
# via virtualenv
typing-inspection==0.4.2
# via pydantic
virtualenv==20.35.4
virtualenv==20.36.1
# via nox
yarl==1.22.0
# via aiohttp
Expand Down
8 changes: 4 additions & 4 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.13.2
aiohttp==3.13.3
# via httpx-aiohttp
# via trycourier
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
anyio==4.12.0
anyio==4.12.1
# via httpx
# via trycourier
async-timeout==5.0.1
# via aiohttp
attrs==25.4.0
# via aiohttp
certifi==2025.11.12
certifi==2026.1.4
# via httpcore
# via httpx
distro==1.9.0
Expand All @@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via httpx-aiohttp
# via trycourier
httpx-aiohttp==0.1.9
httpx-aiohttp==0.1.12
# via trycourier
idna==3.11
# via anyio
Expand Down
41 changes: 0 additions & 41 deletions scripts/mock

This file was deleted.

46 changes: 0 additions & 46 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,7 @@ set -e

cd "$(dirname "$0")/.."

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color

function prism_is_running() {
curl --silent "http://localhost:4010" >/dev/null 2>&1
}

kill_server_on_port() {
pids=$(lsof -t -i tcp:"$1" || echo "")
if [ "$pids" != "" ]; then
kill "$pids"
echo "Stopped $pids."
fi
}

function is_overriding_api_base_url() {
[ -n "$TEST_API_BASE_URL" ]
}

if ! is_overriding_api_base_url && ! prism_is_running ; then
# When we exit this script, make sure to kill the background mock server process
trap 'kill_server_on_port 4010' EXIT

# Start the dev server
./scripts/mock --daemon
fi

if is_overriding_api_base_url ; then
echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}"
echo
elif ! prism_is_running ; then
echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server"
echo -e "running against your OpenAPI spec."
echo
echo -e "To run the server, pass in the path or url of your OpenAPI"
echo -e "spec to the prism command:"
echo
echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}"
echo

exit 1
else
echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}"
echo
fi

export DEFER_PYDANTIC_BUILD=false

Expand Down
Loading