Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
428 commits
Select commit Hold shift + click to select a range
26dd5d6
codegen metadata
stainless-app[bot] Feb 27, 2026
0abf358
codegen metadata
stainless-app[bot] Feb 27, 2026
ccf7695
codegen metadata
stainless-app[bot] Feb 27, 2026
212c918
codegen metadata
stainless-app[bot] Feb 27, 2026
d78a321
chore(ci): bump uv version
stainless-app[bot] Feb 27, 2026
614cab0
codegen metadata
stainless-app[bot] Feb 27, 2026
3c7ef41
codegen metadata
stainless-app[bot] Feb 27, 2026
0e56542
codegen metadata
stainless-app[bot] Feb 27, 2026
efb7aca
codegen metadata
stainless-app[bot] Feb 27, 2026
cbf457f
codegen metadata
stainless-app[bot] Feb 27, 2026
1c8b2e2
codegen metadata
stainless-app[bot] Feb 27, 2026
51d6eff
codegen metadata
stainless-app[bot] Feb 27, 2026
0933a68
codegen metadata
stainless-app[bot] Feb 28, 2026
bac5c67
codegen metadata
stainless-app[bot] Feb 28, 2026
7421334
codegen metadata
stainless-app[bot] Feb 28, 2026
65935ac
codegen metadata
stainless-app[bot] Feb 28, 2026
cf19c50
codegen metadata
stainless-app[bot] Feb 28, 2026
27585a3
codegen metadata
stainless-app[bot] Feb 28, 2026
b039993
codegen metadata
stainless-app[bot] Feb 28, 2026
b3579d4
codegen metadata
stainless-app[bot] Feb 28, 2026
5950823
codegen metadata
stainless-app[bot] Feb 28, 2026
23c6b1a
codegen metadata
stainless-app[bot] Feb 28, 2026
0cb81fe
codegen metadata
stainless-app[bot] Feb 28, 2026
e22e8b0
codegen metadata
stainless-app[bot] Feb 28, 2026
8ab0a09
codegen metadata
stainless-app[bot] Feb 28, 2026
5753c7b
codegen metadata
stainless-app[bot] Feb 28, 2026
0ee2be8
codegen metadata
stainless-app[bot] Feb 28, 2026
2288cff
codegen metadata
stainless-app[bot] Feb 28, 2026
6012a8e
codegen metadata
stainless-app[bot] Feb 28, 2026
f549876
codegen metadata
stainless-app[bot] Feb 28, 2026
38dbb22
codegen metadata
stainless-app[bot] Feb 28, 2026
b1967fb
codegen metadata
stainless-app[bot] Feb 28, 2026
66b4f74
codegen metadata
stainless-app[bot] Feb 28, 2026
547af61
codegen metadata
stainless-app[bot] Feb 28, 2026
2dd3762
codegen metadata
stainless-app[bot] Mar 1, 2026
4bc19e8
codegen metadata
stainless-app[bot] Mar 1, 2026
fe63a0d
codegen metadata
stainless-app[bot] Mar 1, 2026
ceb67d7
codegen metadata
stainless-app[bot] Mar 1, 2026
653a295
codegen metadata
stainless-app[bot] Mar 1, 2026
2b0eabf
codegen metadata
stainless-app[bot] Mar 1, 2026
321eef9
codegen metadata
stainless-app[bot] Mar 1, 2026
00b5e0c
codegen metadata
stainless-app[bot] Mar 1, 2026
fd6f500
codegen metadata
stainless-app[bot] Mar 1, 2026
dc1adba
codegen metadata
stainless-app[bot] Mar 1, 2026
04caafc
codegen metadata
stainless-app[bot] Mar 1, 2026
fdbb001
codegen metadata
stainless-app[bot] Mar 1, 2026
6bc7380
codegen metadata
stainless-app[bot] Mar 1, 2026
36ee0df
codegen metadata
stainless-app[bot] Mar 1, 2026
9d6e1e7
codegen metadata
stainless-app[bot] Mar 1, 2026
8a3a2c7
codegen metadata
stainless-app[bot] Mar 1, 2026
4c41c22
codegen metadata
stainless-app[bot] Mar 1, 2026
1f1079f
codegen metadata
stainless-app[bot] Mar 1, 2026
3bcc0e9
codegen metadata
stainless-app[bot] Mar 1, 2026
1d3a43d
codegen metadata
stainless-app[bot] Mar 1, 2026
3ef3695
codegen metadata
stainless-app[bot] Mar 1, 2026
3adc2c6
codegen metadata
stainless-app[bot] Mar 1, 2026
e8cda05
codegen metadata
stainless-app[bot] Mar 2, 2026
18f7a30
codegen metadata
stainless-app[bot] Mar 2, 2026
9e5de8b
codegen metadata
stainless-app[bot] Mar 2, 2026
340a997
codegen metadata
stainless-app[bot] Mar 2, 2026
2cf800b
codegen metadata
stainless-app[bot] Mar 2, 2026
ac409b5
codegen metadata
stainless-app[bot] Mar 2, 2026
4aa9e31
codegen metadata
stainless-app[bot] Mar 2, 2026
38a3137
codegen metadata
stainless-app[bot] Mar 2, 2026
bb3f358
codegen metadata
stainless-app[bot] Mar 2, 2026
bb76971
codegen metadata
stainless-app[bot] Mar 2, 2026
6387d94
codegen metadata
stainless-app[bot] Mar 2, 2026
00425c1
codegen metadata
stainless-app[bot] Mar 2, 2026
cf2baa9
codegen metadata
stainless-app[bot] Mar 2, 2026
ec769c8
codegen metadata
stainless-app[bot] Mar 2, 2026
d4d997d
codegen metadata
stainless-app[bot] Mar 2, 2026
815a16c
codegen metadata
stainless-app[bot] Mar 2, 2026
e7654c8
codegen metadata
stainless-app[bot] Mar 2, 2026
caa1414
codegen metadata
stainless-app[bot] Mar 2, 2026
6608154
codegen metadata
stainless-app[bot] Mar 2, 2026
081cd87
codegen metadata
stainless-app[bot] Mar 2, 2026
41c6fec
codegen metadata
stainless-app[bot] Mar 2, 2026
748cce9
codegen metadata
stainless-app[bot] Mar 2, 2026
79d6948
codegen metadata
stainless-app[bot] Mar 3, 2026
59efb4e
codegen metadata
stainless-app[bot] Mar 3, 2026
e63bb36
codegen metadata
stainless-app[bot] Mar 3, 2026
c94d0c1
codegen metadata
stainless-app[bot] Mar 3, 2026
d76de0a
codegen metadata
stainless-app[bot] Mar 3, 2026
62cd614
codegen metadata
stainless-app[bot] Mar 3, 2026
042ee88
codegen metadata
stainless-app[bot] Mar 3, 2026
34a1ea5
codegen metadata
stainless-app[bot] Mar 3, 2026
1762edb
codegen metadata
stainless-app[bot] Mar 3, 2026
714d9ea
codegen metadata
stainless-app[bot] Mar 3, 2026
65d327e
codegen metadata
stainless-app[bot] Mar 3, 2026
0756982
codegen metadata
stainless-app[bot] Mar 3, 2026
f1d4db2
codegen metadata
stainless-app[bot] Mar 3, 2026
06a7ef9
codegen metadata
stainless-app[bot] Mar 3, 2026
d53ff08
codegen metadata
stainless-app[bot] Mar 3, 2026
2f648b0
codegen metadata
stainless-app[bot] Mar 3, 2026
dc29108
codegen metadata
stainless-app[bot] Mar 3, 2026
3955a77
codegen metadata
stainless-app[bot] Mar 3, 2026
4252e47
codegen metadata
stainless-app[bot] Mar 3, 2026
7af140f
codegen metadata
stainless-app[bot] Mar 3, 2026
2da787c
codegen metadata
stainless-app[bot] Mar 3, 2026
71d76b6
codegen metadata
stainless-app[bot] Mar 4, 2026
23957ac
codegen metadata
stainless-app[bot] Mar 4, 2026
b8c6a1f
codegen metadata
stainless-app[bot] Mar 4, 2026
179085a
codegen metadata
stainless-app[bot] Mar 4, 2026
b2c6922
codegen metadata
stainless-app[bot] Mar 4, 2026
8d0a5d8
codegen metadata
stainless-app[bot] Mar 4, 2026
93a0986
codegen metadata
stainless-app[bot] Mar 4, 2026
2d412a1
chore(internal): codegen related update
stainless-app[bot] Mar 4, 2026
c55e146
codegen metadata
stainless-app[bot] Mar 4, 2026
5b5b2e3
chore(internal): refactor authentication internals
stainless-app[bot] Mar 4, 2026
921c097
codegen metadata
stainless-app[bot] Mar 4, 2026
5f4a778
codegen metadata
stainless-app[bot] Mar 4, 2026
00cfb89
codegen metadata
stainless-app[bot] Mar 4, 2026
27acc2a
codegen metadata
stainless-app[bot] Mar 4, 2026
c5747ce
codegen metadata
stainless-app[bot] Mar 4, 2026
628acdd
codegen metadata
stainless-app[bot] Mar 4, 2026
b0828f2
codegen metadata
stainless-app[bot] Mar 5, 2026
92d8af7
codegen metadata
stainless-app[bot] Mar 5, 2026
3c206e8
codegen metadata
stainless-app[bot] Mar 5, 2026
7639e5a
codegen metadata
stainless-app[bot] Mar 5, 2026
581b184
codegen metadata
stainless-app[bot] Mar 5, 2026
e92691f
codegen metadata
stainless-app[bot] Mar 5, 2026
df54b99
codegen metadata
stainless-app[bot] Mar 5, 2026
ecec738
codegen metadata
stainless-app[bot] Mar 5, 2026
df2bbf1
codegen metadata
stainless-app[bot] Mar 5, 2026
80b86f7
codegen metadata
stainless-app[bot] Mar 5, 2026
b23c8c0
codegen metadata
stainless-app[bot] Mar 5, 2026
dfcd389
codegen metadata
stainless-app[bot] Mar 5, 2026
ea5133c
codegen metadata
stainless-app[bot] Mar 5, 2026
ac3abcd
codegen metadata
stainless-app[bot] Mar 5, 2026
2ae0794
codegen metadata
stainless-app[bot] Mar 5, 2026
27c1982
codegen metadata
stainless-app[bot] Mar 5, 2026
11adc48
codegen metadata
stainless-app[bot] Mar 5, 2026
c6083e2
codegen metadata
stainless-app[bot] Mar 6, 2026
924b0c0
codegen metadata
stainless-app[bot] Mar 6, 2026
23371b5
codegen metadata
stainless-app[bot] Mar 6, 2026
2e113a3
codegen metadata
stainless-app[bot] Mar 6, 2026
66550b5
codegen metadata
stainless-app[bot] Mar 6, 2026
24368a5
codegen metadata
stainless-app[bot] Mar 6, 2026
b196050
codegen metadata
stainless-app[bot] Mar 6, 2026
71caceb
codegen metadata
stainless-app[bot] Mar 6, 2026
3e8097c
codegen metadata
stainless-app[bot] Mar 6, 2026
df707fd
codegen metadata
stainless-app[bot] Mar 6, 2026
01ab37a
codegen metadata
stainless-app[bot] Mar 6, 2026
20982f2
codegen metadata
stainless-app[bot] Mar 6, 2026
655ee03
codegen metadata
stainless-app[bot] Mar 6, 2026
27104a4
codegen metadata
stainless-app[bot] Mar 6, 2026
0753143
codegen metadata
stainless-app[bot] Mar 6, 2026
742851e
codegen metadata
stainless-app[bot] Mar 6, 2026
d2625bd
codegen metadata
stainless-app[bot] Mar 6, 2026
a6bfe3e
codegen metadata
stainless-app[bot] Mar 7, 2026
dd726a1
codegen metadata
stainless-app[bot] Mar 7, 2026
5de8476
codegen metadata
stainless-app[bot] Mar 7, 2026
4a8052e
codegen metadata
stainless-app[bot] Mar 7, 2026
98b0686
codegen metadata
stainless-app[bot] Mar 7, 2026
4583cad
codegen metadata
stainless-app[bot] Mar 7, 2026
bbf8a0a
codegen metadata
stainless-app[bot] Mar 7, 2026
abfa108
codegen metadata
stainless-app[bot] Mar 7, 2026
5f954e0
codegen metadata
stainless-app[bot] Mar 7, 2026
96295dc
codegen metadata
stainless-app[bot] Mar 7, 2026
26a348d
codegen metadata
stainless-app[bot] Mar 7, 2026
a54fd92
codegen metadata
stainless-app[bot] Mar 7, 2026
4c421bd
codegen metadata
stainless-app[bot] Mar 7, 2026
f05912d
codegen metadata
stainless-app[bot] Mar 7, 2026
38d7757
codegen metadata
stainless-app[bot] Mar 7, 2026
2322679
codegen metadata
stainless-app[bot] Mar 7, 2026
206e3b8
codegen metadata
stainless-app[bot] Mar 7, 2026
de886c0
codegen metadata
stainless-app[bot] Mar 7, 2026
ea8153e
codegen metadata
stainless-app[bot] Mar 7, 2026
ab941f0
codegen metadata
stainless-app[bot] Mar 7, 2026
64cc8f6
codegen metadata
stainless-app[bot] Mar 8, 2026
846591b
codegen metadata
stainless-app[bot] Mar 8, 2026
bea8db4
chore(ci): skip uploading artifacts on stainless-internal branches
stainless-app[bot] Mar 8, 2026
312c71e
codegen metadata
stainless-app[bot] Mar 8, 2026
10593d7
codegen metadata
stainless-app[bot] Mar 8, 2026
3d19daa
codegen metadata
stainless-app[bot] Mar 8, 2026
3ce6a79
codegen metadata
stainless-app[bot] Mar 8, 2026
0564984
codegen metadata
stainless-app[bot] Mar 8, 2026
81cda09
codegen metadata
stainless-app[bot] Mar 8, 2026
efde2d6
codegen metadata
stainless-app[bot] Mar 8, 2026
61bd619
codegen metadata
stainless-app[bot] Mar 8, 2026
67b09ad
codegen metadata
stainless-app[bot] Mar 8, 2026
7e9b8a6
codegen metadata
stainless-app[bot] Mar 8, 2026
90cce73
codegen metadata
stainless-app[bot] Mar 8, 2026
0a88183
codegen metadata
stainless-app[bot] Mar 8, 2026
e6bece7
codegen metadata
stainless-app[bot] Mar 8, 2026
f7b25a6
codegen metadata
stainless-app[bot] Mar 8, 2026
34ab5b5
codegen metadata
stainless-app[bot] Mar 8, 2026
acfa6e6
codegen metadata
stainless-app[bot] Mar 8, 2026
0de1596
codegen metadata
stainless-app[bot] Mar 8, 2026
10175b4
codegen metadata
stainless-app[bot] Mar 8, 2026
53d91b9
codegen metadata
stainless-app[bot] Mar 8, 2026
1daf07c
codegen metadata
stainless-app[bot] Mar 9, 2026
437a92c
codegen metadata
stainless-app[bot] Mar 9, 2026
a68ffae
codegen metadata
stainless-app[bot] Mar 9, 2026
1c0ebf9
codegen metadata
stainless-app[bot] Mar 9, 2026
c90651f
codegen metadata
stainless-app[bot] Mar 9, 2026
2fe7e6d
codegen metadata
stainless-app[bot] Mar 9, 2026
9f02250
codegen metadata
stainless-app[bot] Mar 9, 2026
8e9927a
codegen metadata
stainless-app[bot] Mar 9, 2026
fac9837
codegen metadata
stainless-app[bot] Mar 9, 2026
16b729e
codegen metadata
stainless-app[bot] Mar 9, 2026
d80384a
codegen metadata
stainless-app[bot] Mar 9, 2026
79b7600
codegen metadata
stainless-app[bot] Mar 9, 2026
d2c2b52
codegen metadata
stainless-app[bot] Mar 9, 2026
4867bbe
codegen metadata
stainless-app[bot] Mar 9, 2026
205f727
codegen metadata
stainless-app[bot] Mar 9, 2026
22b7e5d
codegen metadata
stainless-app[bot] Mar 9, 2026
ec0d1f2
codegen metadata
stainless-app[bot] Mar 9, 2026
1699907
codegen metadata
stainless-app[bot] Mar 9, 2026
3bf8a3e
codegen metadata
stainless-app[bot] Mar 9, 2026
15a9c3b
codegen metadata
stainless-app[bot] Mar 10, 2026
554ba06
codegen metadata
stainless-app[bot] Mar 10, 2026
73b42b2
codegen metadata
stainless-app[bot] Mar 10, 2026
ff67cc0
codegen metadata
stainless-app[bot] Mar 10, 2026
3cfca26
codegen metadata
stainless-app[bot] Mar 10, 2026
e6b7f65
codegen metadata
stainless-app[bot] Mar 10, 2026
a432cf8
codegen metadata
stainless-app[bot] Mar 10, 2026
f79a536
codegen metadata
stainless-app[bot] Mar 10, 2026
367916a
codegen metadata
stainless-app[bot] Mar 10, 2026
da0bf9e
codegen metadata
stainless-app[bot] Mar 10, 2026
0d54876
codegen metadata
stainless-app[bot] Mar 10, 2026
37757a9
codegen metadata
stainless-app[bot] Mar 10, 2026
908bc1b
codegen metadata
stainless-app[bot] Mar 10, 2026
7400639
codegen metadata
stainless-app[bot] Mar 10, 2026
acdca72
codegen metadata
stainless-app[bot] Mar 10, 2026
8bba72a
codegen metadata
stainless-app[bot] Mar 10, 2026
3c7ae1d
codegen metadata
stainless-app[bot] Mar 10, 2026
d4fd591
codegen metadata
stainless-app[bot] Mar 10, 2026
55ac539
codegen metadata
stainless-app[bot] Mar 10, 2026
e269774
codegen metadata
stainless-app[bot] Mar 10, 2026
90cf691
codegen metadata
stainless-app[bot] Mar 11, 2026
96ae80b
codegen metadata
stainless-app[bot] Mar 11, 2026
cbe47f1
codegen metadata
stainless-app[bot] Mar 11, 2026
ef145b6
codegen metadata
stainless-app[bot] Mar 11, 2026
93584be
codegen metadata
stainless-app[bot] Mar 11, 2026
75d5bd2
codegen metadata
stainless-app[bot] Mar 11, 2026
bcc0996
codegen metadata
stainless-app[bot] Mar 11, 2026
42279df
codegen metadata
stainless-app[bot] Mar 11, 2026
688ecd9
codegen metadata
stainless-app[bot] Mar 11, 2026
0728772
codegen metadata
stainless-app[bot] Mar 11, 2026
ba9ae44
codegen metadata
stainless-app[bot] Mar 11, 2026
7057a6a
codegen metadata
stainless-app[bot] Mar 11, 2026
302a733
codegen metadata
stainless-app[bot] Mar 11, 2026
3c5ced8
codegen metadata
stainless-app[bot] Mar 11, 2026
850b3e9
codegen metadata
stainless-app[bot] Mar 11, 2026
27e47ae
codegen metadata
stainless-app[bot] Mar 11, 2026
ed71557
codegen metadata
stainless-app[bot] Mar 11, 2026
9fd8996
codegen metadata
stainless-app[bot] Mar 11, 2026
dafa053
codegen metadata
stainless-app[bot] Mar 11, 2026
0503506
release: 0.8.1
stainless-app[bot] Mar 11, 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
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.9.13'
version: '0.10.2'

- name: Install dependencies
run: uv sync --all-extras
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.9.13'
version: '0.10.2'

- name: Install dependencies
run: uv sync --all-extras
Expand All @@ -55,14 +55,18 @@ jobs:
run: uv build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/sent-dm-python'
if: |-
github.repository == 'stainless-sdks/sent-dm-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/sent-dm-python'
if: |-
github.repository == 'stainless-sdks/sent-dm-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand All @@ -80,7 +84,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: '0.9.13'
version: '0.10.2'

- name: Bootstrap
run: ./scripts/bootstrap
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 @@
{
".": "0.8.0"
".": "0.8.1"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 44
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-433bfd8c688a6b6d2d4f964bb59121d692798f4e2bb6cb47f6110c4f0e1f638d.yml
openapi_spec_hash: 5378295d401c8c1152c1946cc7dbd69f
config_hash: 43a0daa5b05d44a1620e3da0ea6f4fdc
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sent%2Fsent-dm-c1e54655c045f25bd08ecc70c87f938e429911c413c09957d83d3eb9eaab2372.yml
openapi_spec_hash: 44b7f99e2660bde83eff178b9d4ec00c
config_hash: d475a61f5b59375bf562f85f19b80409
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 0.8.1 (2026-03-11)

Full Changelog: [v0.8.0...v0.8.1](https://github.com/sentdm/sent-dm-python/compare/v0.8.0...v0.8.1)

### Chores

* **ci:** bump uv version ([d78a321](https://github.com/sentdm/sent-dm-python/commit/d78a321a68d21ef2c3d2b026a300f08676cb763c))
* **ci:** skip uploading artifacts on stainless-internal branches ([bea8db4](https://github.com/sentdm/sent-dm-python/commit/bea8db458b817c77e4a0fbb3c2dbe2ec0a49a1e0))
* **internal:** codegen related update ([2d412a1](https://github.com/sentdm/sent-dm-python/commit/2d412a10404c8b67d8b078122d1bce7fc7428a01))
* **internal:** make `test_proxy_environment_variables` more resilient to env ([99f2ac4](https://github.com/sentdm/sent-dm-python/commit/99f2ac4367e0e62c9ad06e95c535080e928fd5a7))
* **internal:** refactor authentication internals ([5b5b2e3](https://github.com/sentdm/sent-dm-python/commit/5b5b2e32d87fc7447fd435f9db4f41ce8bccab24))

## 0.8.0 (2026-02-18)

Full Changelog: [v0.7.0...v0.8.0](https://github.com/sentdm/sent-dm-python/compare/v0.7.0...v0.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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://

It is generated with [Stainless](https://www.stainless.com/).

## MCP Server

Use the Sent Dm MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40sentdm%2Fsentdm-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBzZW50ZG0vc2VudGRtLW1jcCJdLCJlbnYiOnsiU0VOVF9ETV9BUElfS0VZIjoiTXkgQVBJIEtleSJ9fQ)
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40sentdm%2Fsentdm-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40sentdm%2Fsentdm-mcp%22%5D%2C%22env%22%3A%7B%22SENT_DM_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)

> Note: You may need to set environment variables in your MCP client.

## Documentation

The REST API documentation can be found on [docs.sent.dm](https://docs.sent.dm). The full API of this library can be found in [api.md](api.md).
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 = "sentdm"
version = "0.8.0"
version = "0.8.1"
description = "The official Python library for the sent-dm API"
dynamic = ["readme"]
license = "Apache-2.0"
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
34 changes: 28 additions & 6 deletions src/sent_dm/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
)
from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
from ._compat import PYDANTIC_V1, model_copy, model_dump
from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
from ._models import GenericModel, SecurityOptions, FinalRequestOptions, validate_type, construct_type
from ._response import (
APIResponse,
BaseAPIResponse,
Expand Down Expand Up @@ -432,9 +432,27 @@ def _make_status_error(
) -> _exceptions.APIStatusError:
raise NotImplementedError()

def _auth_headers(
self,
security: SecurityOptions, # noqa: ARG002
) -> dict[str, str]:
return {}

def _auth_query(
self,
security: SecurityOptions, # noqa: ARG002
) -> dict[str, str]:
return {}

def _custom_auth(
self,
security: SecurityOptions, # noqa: ARG002
) -> httpx.Auth | None:
return None

def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0) -> httpx.Headers:
custom_headers = options.headers or {}
headers_dict = _merge_mappings(self.default_headers, custom_headers)
headers_dict = _merge_mappings({**self._auth_headers(options.security), **self.default_headers}, custom_headers)
self._validate_headers(headers_dict, custom_headers)

# headers are case-insensitive while dictionaries are not.
Expand Down Expand Up @@ -506,7 +524,7 @@ def _build_request(
raise RuntimeError(f"Unexpected JSON data type, {type(json_data)}, cannot merge with `extra_body`")

headers = self._build_headers(options, retries_taken=retries_taken)
params = _merge_mappings(self.default_query, options.params)
params = _merge_mappings({**self._auth_query(options.security), **self.default_query}, options.params)
content_type = headers.get("Content-Type")
files = options.files

Expand Down Expand Up @@ -671,7 +689,6 @@ def default_headers(self) -> dict[str, str | Omit]:
"Content-Type": "application/json",
"User-Agent": self.user_agent,
**self.platform_headers(),
**self.auth_headers,
**self._custom_headers,
}

Expand Down Expand Up @@ -990,8 +1007,9 @@ def request(
self._prepare_request(request)

kwargs: HttpxSendArgs = {}
if self.custom_auth is not None:
kwargs["auth"] = self.custom_auth
custom_auth = self._custom_auth(options.security)
if custom_auth is not None:
kwargs["auth"] = custom_auth

if options.follow_redirects is not None:
kwargs["follow_redirects"] = options.follow_redirects
Expand Down Expand Up @@ -1952,6 +1970,7 @@ def make_request_options(
idempotency_key: str | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
post_parser: PostParser | NotGiven = not_given,
security: SecurityOptions | None = None,
) -> RequestOptions:
"""Create a dict of type RequestOptions without keys of NotGiven values."""
options: RequestOptions = {}
Expand All @@ -1977,6 +1996,9 @@ def make_request_options(
# internal
options["post_parser"] = post_parser # type: ignore

if security is not None:
options["security"] = security

return options


Expand Down
Loading
Loading